Consider the following bash command line, where ^ denotes the cursor location:
svn commit -m very/long/path/to/some/file "[bug 123456] Fix the pixel issue"
^
I'd like to commit a different file with the same message. How can I delete the current word, from cursor location to the next space? Is there also a shortcut for backward deletion, form the cursor to the first space backwards?
Update: ctrl+w erases backwards, but which shortcut erases one word forward?
I answered similar question on unix.stackexchange.com:
The only difference is you have to use "shell-kill-word" command instead, since you want to delete forward.
There is also a "kill-word" command with Meta+d shortcut (try Esc+d if you don't have Meta key). It will delete only one part of path at once.
Tested both the esc+d and alt/opt+d on OSX Mavericks and they work there as well.