Bash behaviour
I've just migrated from bash
to zsh
. In bash
, I had the following line in ~/.inputrc
.
"\e\C-?": unix-filename-rubout
Hence, Alt+Backspace would delete back to the previous slash, which was useful for editing paths.
Separately, bash
defaults to making Ctrl+w delete to the previous space, which is useful for deleting whole arguments (presuming they don't have spaces). Hence, there two slightly different actions performed with each key combination.
Zsh behaviour
In zsh
, both Alt+Backspace and Ctrl+w do the same thing. They both delete the previous word, but they are too liberal with what constitutes a word-break, deleting up to the previous -
or _
. Is there a way to make zsh
behave similarly to bash
, with two independent actions? If it's important, I have oh-my-zsh
installed.
/
and delete to the last ` `. They have different functions.bash
-like Alt+Backspace behaviour, but I'd still like the (different)bash
-like Ctrl+w behaviour, i.e. delete to last space.