Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just switched from bash to zsh. One thing that is different and a bit annoying from me that Alt-Backspace removes the whole argument instead of just one word. I'm used to using it to remove one level of directory in a file path on the command line. Is there a keystroke for zsh that I could use instead?

share|improve this question

This is a frequently asked question, see e.g.

However, some answers seem to be outdated (contribution to the mailing list dating back to 2001) or rather complicated.

In the easiest case (and answering your specific question to delete back to a slash) I'd boil it down to

autoload -Uz select-word-style
select-word-style bash

As always with zsh you can, but sometimes also have to do much more customization if it does not suit your needs out of the box. Because I'm no expert for select-word-style (I've written my own widgets for that purpose), please refer to man zshcontrib for a detailed explanation of the options.

share|improve this answer

The default combination working for me is CTRL + w

share|improve this answer
What is STRG? Next to the ANY key? – Kevin Panko Jan 4 '14 at 21:37
sorry, just edited, forgot that this is the german name for the key – noggerl Jan 5 '14 at 11:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.