view .inputrc @ 951:cd7f2ae9c8fd default tip

Replace TERM=mintty with "xterm" as remote Debian doesn't have "mintty" definition.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Sat, 21 Nov 2020 20:40:18 +0200
parents 2f29215b95f4
children
line wrap: on
line source

# 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

# Terminal driver rebound some keys. See output 'stty -a'. I like original
# control codes (to set 'C-w', etc).
set bind-tty-special-chars off

# Ignore hidden files.
set match-hidden-files off

# 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

# Replace common prefix with ...
set completion-prefix-display-length 1

# Do not duplicate completion if we in the middle of the word.
set skip-completed-text on

# If set to 'on', completed directory names have a slash appended. The default is 'on'.
set mark-directories on
set mark-symlinked-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

$if Bash
  set colored-stats on
$endif

# 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
Space: magic-space
$endif

# Define my favorite Emacs key bindings.
"\C-@": set-mark
"\C-w": kill-region
"\M-w": copy-region-as-kill

# Ctrl+Left/Right to move by whole words.
"\e[1;5C": forward-word
"\e[1;5D": backward-word
# Same with Shift pressed.
"\e[1;6C": forward-word
"\e[1;6D": backward-word

# Ctrl+Backspace/Delete to delete whole words.
"\e[3;5~": kill-word
"\C-_": backward-kill-word

# UP/DOWN filter history by typed string as prefix.
"\e[A": history-search-backward
"\C-p": history-search-backward
"\eOA": history-search-backward
"\e[B": history-search-forward
"\C-n": history-search-forward
"\eOB": history-search-forward

"\e/" complete-filename
# Bind 'Shift+TAB' to complete as in Python TAB was need for another purpose.
"\e[Z": complete
# Cycling possible completion forward and backward in place.
"\e[1;3C": menu-complete                    # M-Right
"\e[1;3D": menu-complete-backward           # M-Left
"\e[1;5I": menu-complete                    # C-TAB

# Local Variables:
# mode: shell-script
# fill-column: 78
# End: