Procházet zdrojové kódy

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

Weiyi Lou před 10 roky
rodič
revize
b29f72114b
2 změnil soubory, kde provedl 6 přidání a 3 odebrání
  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