I've become pretty proficient with a number of bash shortcut keys that make my bash-ing faster: C-a/C-e, C-u, C-w, M-f/M-b, C-r etc. One common task that I haven't found a good shortcut for though is when I want to delete the last segment of a path:
Say I have
ls ~/projects/arcaneweb/libraries
and I realize I actually meant
ls ~/projects/arcaneweb/sources
Is there a way to just delete libraries, saving a load of keystrokes?
WORDCHARSenv variable:WORDCHARS=${WORDCHARS//[-\/]}(removes - and / from being part of a "word"). I find this very useful so thought I'd share. – James O'Gorman Dec 28 '11 at 19:23M-Backspacerepeatedly until desired effect is reached. – jw013 Dec 29 '11 at 2:52