1

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 1

4

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.

1
  • 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 :-/ Commented Nov 18, 2011 at 22:24

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.