For the latest MacOS Sierra + iTerm2 + oh-my-zsh, if I constantly press CTRL W after entering cd /usr/local/share/gobject-introspection-1.0 , then the story will look like this:
cd /usr/local/share/gobject-introspection-1.0 cd /usr/local/share/gobject-introspection-1. cd /usr/local/share/gobject-introspection- cd /usr/local/share/gobject- cd /usr/local/share/ cd /usr/local/
I do not have key binding files or other files. I don't like too many files. Here is my .zshrc necessary part:
... bindkey -e bindkey '^[[1;9C' forward-word bindkey '^[[1;9D' backward-word ...
If the above doesn't work or you don't like it, you can try this on ~/.zshrc :
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
or:
autoload -U select-word-style select-word-style bash
or ( I found the following value listed here ):
tcsh-backward-delete-word () { local WORDCHARS="${WORDCHARS:s#/#}" zle backward-delete-word } bindkey '^W' tcsh-backward-delete-word
source share