소스 검색

Add back ctrl-l to clear screen in bash

Removed when we switched off `bind-tty-special-chars`.
Weiyi Lou 9 년 전
부모
커밋
0a35aa2bbc
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      shell/bash/keybindings.bash

+ 7 - 1
shell/bash/keybindings.bash

@@ -1,6 +1,12 @@
 # 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.
+# Stop readline from auto-binding some control characters (e.g. ctrl-w) so that
+# they can be reassigned as desired.
 bind 'set bind-tty-special-chars off'
+
+# Set Ctrl-w to delete by word boundaries instead of to the previous space.
 bind '\C-w:backward-kill-word'
+
+# Set Ctrl-l to clear the screen.
+bind '\C-l:clear-screen'