In zsh, I can do this with the Emacs shortcuts. Your example above would be Alt-Backspace (or M-DEL in Emacs' lingo).
To do this, I have the following in .zshrc. (Note the URL -- I'm not taking credit for this!)
## emacs cursor-word movement (not identical but close enough)
# also necessary for this:
# /usr/share/zsh/functions/forward-word-match
# (from http://stackoverflow.com/questions/10847255 )
autoload -U select-word-style
select-word-style bash
The file mentioned looks like this:
emulate -L zsh
setopt extendedglob
local curcontext=":zle:$WIDGET" word
local -a matched_words
integer count=${NUMERIC:-1}
if (( count < 0 )); then
(( NUMERIC = -count ))
zle ${WIDGET/forward/backward}
return
fi
while (( count-- )); do
match-words-by-style
# For some reason forward-word doesn't work like the other word
# commands; it skips whitespace only after any matched word
# characters.
if [[ -n $matched_words[4] ]]; then
# just skip the whitespace and the following word
word=$matched_words[4]$matched_words[5]
else
# skip the word but not the trailing whitespace
word=$matched_words[5]
fi
if [[ -n $word ]]; then
(( CURSOR += ${#word} ))
else
return 1
fi
done
return 0