Bladeren bron

Change bash's ctrl-w to delete by word boundaries

Weiyi Lou 10 jaren geleden
bovenliggende
commit
b29f72114b
2 gewijzigde bestanden met toevoegingen van 6 en 3 verwijderingen
  1. 6 0
      shell/bash/keybindings.bash
  2. 0 3
      shell/bashrc

+ 6 - 0
shell/bash/keybindings.bash

@@ -0,0 +1,6 @@
+# Use vi-bindings in readline for command editing
+set -o vi
+
+# Set Ctrl-w to delete by word boundaries instead of to the previous space.
+bind 'set bind-tty-special-chars off'
+bind '\C-w:backward-kill-word'

+ 0 - 3
shell/bashrc

@@ -2,9 +2,6 @@ source ~/dotfiles/shell/env
 
 [[ -r ~/.bashlocal ]] && source ~/.bashlocal
 
-# Use vi-bindings in readline for command editing
-set -o vi
-
 source ~/dotfiles/shell/common/load
 
 for file in ~/dotfiles/shell/bash/*.bash; do