rluserman: Sample Init File

1 
1 1.3.3 Sample Init File
1 ----------------------
1 
1 Here is an example of an INPUTRC file.  This illustrates key binding,
1 variable assignment, and conditional syntax.
1 
1      # This file controls the behaviour of line input editing for
1      # programs that use the GNU Readline library.  Existing
1      # programs include FTP, Bash, and GDB.
1      #
1      # You can re-read the inputrc file with C-x C-r.
1      # Lines beginning with '#' are comments.
1      #
1      # First, include any system-wide bindings and variable
1      # assignments from /etc/Inputrc
1      $include /etc/Inputrc
1 
1      #
1      # Set various bindings for emacs mode.
1 
1      set editing-mode emacs
1 
1      $if mode=emacs
1 
1      Meta-Control-h:	backward-kill-word	Text after the function name is ignored
1 
1      #
1      # Arrow keys in keypad mode
1      #
1      #"\M-OD":        backward-char
1      #"\M-OC":        forward-char
1      #"\M-OA":        previous-history
1      #"\M-OB":        next-history
1      #
1      # Arrow keys in ANSI mode
1      #
1      "\M-[D":        backward-char
1      "\M-[C":        forward-char
1      "\M-[A":        previous-history
1      "\M-[B":        next-history
1      #
1      # Arrow keys in 8 bit keypad mode
1      #
1      #"\M-\C-OD":       backward-char
1      #"\M-\C-OC":       forward-char
1      #"\M-\C-OA":       previous-history
1      #"\M-\C-OB":       next-history
1      #
1      # Arrow keys in 8 bit ANSI mode
1      #
1      #"\M-\C-[D":       backward-char
1      #"\M-\C-[C":       forward-char
1      #"\M-\C-[A":       previous-history
1      #"\M-\C-[B":       next-history
1 
1      C-q: quoted-insert
1 
1      $endif
1 
1      # An old-style binding.  This happens to be the default.
1      TAB: complete
1 
1      # Macros that are convenient for shell interaction
1      $if Bash
1      # edit the path
1      "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
1      # prepare to type a quoted word --
1      # insert open and close double quotes
1      # and move to just after the open quote
1      "\C-x\"": "\"\"\C-b"
1      # insert a backslash (testing backslash escapes
1      # in sequences and macros)
1      "\C-x\\": "\\"
1      # Quote the current or previous word
1      "\C-xq": "\eb\"\ef\""
1      # Add a binding to refresh the line, which is unbound
1      "\C-xr": redraw-current-line
1      # Edit variable on current line.
1      "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
1      $endif
1 
1      # use a visible bell if one is available
1      set bell-style visible
1 
1      # don't strip characters to 7 bits when reading
1      set input-meta on
1 
1      # allow iso-latin1 characters to be inserted rather
1      # than converted to prefix-meta sequences
1      set convert-meta off
1 
1      # display characters with the eighth bit set directly
1      # rather than as meta-prefixed characters
1      set output-meta on
1 
1      # if there are more than 150 possible completions for
1      # a word, ask the user if he wants to see all of them
1      set completion-query-items 150
1 
1      # For FTP
1      $if Ftp
1      "\C-xg": "get \M-?"
1      "\C-xt": "put \M-?"
1      "\M-.": yank-last-arg
1      $endif
1