1

I use a Mac at home and have changed my modifier keys swapping Command and CTRL, so CTRL+T spawns a new tab in chrome, CTRL+C is copy and so forth. I use Windows/Linux at work and I want a consistent layout between these OSes (not having to consciously switch to Command on OSX and back to CTRL when at work).

I've installed iTerm2 to replace OSX Terminal, this allows me to capture CTRL+W without having it kill the window. I don't know what to bind this shortcut to in order to emulate the default behaviour in bash/puTTY (werase?) where it deletes text before the cursor up to the first space.

find . -name "my.file" -type

CTRL+W would delete '-type' from the above command leaving:

find . -name "my.file"
Greg K
  • 358
  • 1
  • 4
  • 16

1 Answers1

0

Put this line, quotes and all, in your ~/.inputrc file (you may have to restart Bash after you edit that file):

"\C-w": backward-kill-word
Fran
  • 5,511