Hacker News new | ask | show | jobs
by Saser 3732 days ago
In zsh (or at least with my configuration, which is prezto with a few plugins), Ctrl-q lets you "stash" your current command.

Say that you are typing some really long, complex command, and suddenly you realize that you are in the wrong folder. You press Ctrl-q (which clears the command and "stashes" it), then you cd to the right folder. As soon as you return to the prompt after issuing your cd command, your really long, complex command is back just as you typed it.