In zsh, how can I set up the line editor such that backward-kill-word stops on a directory separator? Currently in my bash setup, if I type
cd ~/devel/sandbox <
Another option is to set WORDCHARS (non-alphanumeric chars treated as part of a word) to something that doesn't include /.
WORDCHARS
/
You can also tweak this if you'd prefer ^w to break on dot, underscore, etc. In ~/.zshrc I have:
^w
~/.zshrc
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'