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?
How to delete one directory level in a command argument (up to a slash) on ZSH command line
command linetext editingzsh
Best Answer
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
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 forselect-word-style
(I've written my own widgets for that purpose), please refer toman zshcontrib
for a detailed explanation of the options.