Sometimes I type a lengthy command in my command prompt and then notice that I need to check something before actually pressing return and executing the command. I press ctrl+c, execute the new command and then type the cancelled command again and execute it.Is there a way to save the command I am to cancel with ctrl+c and restore it later when I finished the check something command?Note that I do not want to open another terminal, because I am on a remote server via ssh.Shellshot:$ git commit -am 'FOO-123: fix issue with dorks around bars'^C$ git status# On branch foomodified: foo.php$ git commit -am 'FOO-123: fix issue with dorks around bars'1 file changed, 46 deletions(-)$ 
store command before pressing ctrl+c, revive afterwards
shell;command line
In Unix, you could use command-line editor for such a thing. I typically run with set -o emacs so I can use the following Emacs keys directly on the command line:display your command lineCtrl-A - go to the beginning of the command lineCtrl-K - cut the entire command line into an internal buffer... do all needed work here...Ctrl-Y - paste command from buffer into the command lineYou can also set -o vi and then use vi shortcuts for this sort of thing.