1 # This file controls the behaviour of line input editing for programs that use
 
   2 # the GNU Readline library. See 'man bash' >> "READLINE" for documentation on
 
   3 # readline options and commands.
 
   4 # https://www.gnu.org/software/bash/manual/bashref.html#Command-Line-Editing
 
   6 # Use 'bind' ('man bash' >> "SHELL BUILTIN COMMANDS") to view current readline
 
   9 #      Display readline function names and bindings in such a way that they can
 
  11 #   bind -p | egrep -v "^#" | LC_ALL='C' egrep -v "(self-insert|do-lowercase-version|digit-argument)"
 
  12 #      Display only "interesting" mappings from `bind -p`.
 
  13 #   bind -P | grep -v "is not bound"
 
  14 #      List current readline function names and bindings.
 
  16 #      List current readline variable names and values.
 
  18 set bell-style visible
 
  23 set horizontal-scroll-mode off
 
  24 set history-preserve-point on
 
  25 set mark-directories on
 
  26 set mark-symlinked-directories on
 
  27 set match-hidden-files off
 
  31 set page-completions off
 
  32 set completion-query-items 2000
 
  33 set completion-ignore-case off
 
  34 set show-all-if-ambiguous on
 
  35 set show-all-if-unmodified on
 
  36 set completion-prefix-display-length 10
 
  37 set print-completions-horizontally off
 
  39 set editing-mode emacs
 
  42 "\C-x\C-r": re-read-init-file
 
  44 "\C-n": history-search-forward
 
  45 "\C-p": history-search-backward
 
  49 "\e[A": history-search-backward
 
  50 "\e[B": history-search-forward
 
  52 # for linux console and RH/Debian xterm
 
  53 "\e[1~": beginning-of-line
 
  55 "\e[5~": beginning-of-history
 
  56 "\e[6~": end-of-history
 
  58 "\e[2~": quoted-insert
 
  59 # for non RH/Debian xterm, can't hurt for RH/Debian xterm
 
  60 "\eOH": beginning-of-line
 
  63 "\e[H": beginning-of-line
 
  72 # Ctrl-left-arrow and Ctrl-right-arrow for word moving
 
  74 "\e[5D": backward-word
 
  75 "\e\e[C": forward-word
 
  76 "\e\e[D": backward-word
 
  77 "\e[1;5C": forward-word
 
  78 "\e[1;5D": backward-word