Define my favorite Emacs key bindings.
# Settings for readline.
#
# Tips:
# C-x C-r re-read ~/.inputrc
# I like this!
set editing-mode emacs
# Don't strip characters to 7 bits when reading.
set input-meta on
# Allow iso-latin1 characters to be inserted rather than converted to
# prefix-meta sequences.
set convert-meta off
# Display characters with the eighth bit set directly rather than as
# meta-prefixed characters.
set output-meta on
# Ignore case (on/off).
set completion-ignore-case on
set completion-query-items 100
# First tab suggests ambiguous variants.
set show-all-if-ambiguous on
# If set to 'on', completed directory names have a slash appended. The default is 'on'.
set mark-directories on
# If set to 'on', a character denoting a file's type is appended to the
# filename when listing possible completions. The default is 'off'.
set visible-stats on
# I like beep (audible/visible/none).
set bell-style audible
# 'quoted-insert' binded to C-q or C-v by default, but C-q usually not worked
# because it handled by terminal driver before readline.
C-v: quoted-insert
# Setting it to 'on' means that the text of the lines being edited will scroll
# horizontally on a single screen line when they are longer than the width of
# the screen, instead of wrapping onto a new screen line. By default, this
# variable is set to 'off'.
set horizontal-scroll-mode off
# This variable, when set to `on', causes Readline to display an asterisk
# ('*') at the start of history lines which have been modified. This variable
# is 'off' by default.
set mark-modified-lines off
$if Bash
# Invoke an editor on the current command line, and execute the result as
# shell commands. Bash attempts to invoke $FCEDIT, $EDITOR, and emacs as the
# editor, in that order.
"\C-x\C-e": edit-and-execute-command
$endif
# Define my favorite Emacs key bindings.
"\C-w": kill-region
"M-w": copy-region-as-kill
# Local Variables:
# mode: shell-script
# fill-column: 78
# End: