When I use tab-completion in zsh, the shell suggests me files and I discover that I'm in the wrong directory. How can I just delete the suggestion instead of backspace'ing it?
1 Answer
You can use the undo command (C-_ or C-x u) to cancel the effect of the last completion.
You can then press C-q or M-q to “suspend” the current command, enter cd correct-directory and resume your editing of that suspended command.
- Thanks Gilles. Hmm they all do not work, but I guess that is because I'm using iTerm on Mac, and the key combinations are actually triggering iTerm. For example, M-q quits iTerm :-/Daniel– Daniel2011-11-18 22:24:39 +00:00Commented Nov 18, 2011 at 22:24