Skip to content

Instantly share code, notes, and snippets.

@Trucido
Last active May 20, 2018 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trucido/7fdf7fd8316ac298c4b9b2ea734b5ec2 to your computer and use it in GitHub Desktop.
Save Trucido/7fdf7fd8316ac298c4b9b2ea734b5ec2 to your computer and use it in GitHub Desktop.
~/.inputrc
################################################################################
## ~/.inputrc
##
## Control the behaviour of the readline library used e.g.
## by the bash in the interactive mode for line editing.
##
################################################################################
##----------------------------------------------------------------------------##
## readline(3) - Global order: /etc/inputrc, ${INPUTRC:-$HOME/.inputrc}
## Note: Profile, Environment, and other rc files can override these values;
## `set -o|+o`, `shopt -s|+s`, `setopt`, `setenv`, `bindkey`, `typeset` etc.
## Note: To manually set readline vars, functions, or keybinds;
## `bind "set readline-variable VAL"` VAL=[On|on|1]|[Off|off|0]
## Note: If not using INPUTRC=/path/to/file var, a file may be manually loaded;
## `bind -f /path/to/inputrc` | `bind -f ~/.dir/file`
##----------------------------------------------------------------------------##
#
# Include system inputrc first before any custom keymaps
# Avoids overwriting entire keymap or strange clobbering issues.
# Example:
# $if mode=vi
# set keymap vi-command
# $include /some/dir/inputrc.vi-command
# set keymap vi-insert
# $include /some/dir/inputrc.vi-insert
# $endif
# *Normally not needed.
#$include /etc/inputrc
#
# meta-flag (Off)
# synonym for input-meta
# input-meta (Off)
# If set to On, readline will enable eight-bit input (that is, it
# will not clear the eighth bit in the characters it reads),
# regardless of what the terminal claims it can support. The name
# meta-flag is a synonym for this variable. The default is Off,
# but readline will set it to On if the locale contains eight-bit
# characters.
# output-meta (Off)
# If set to On, readline will display characters with the eighth
# bit set directly rather than as a meta-prefixed escape sequence.
# The default is Off, but readline will set it to On if the locale
# contains eight-bit characters.
# convert-meta (On)
# If set to On, readline will convert characters with the eighth
# bit set to an ASCII key sequence by stripping the eighth bit and
# prefixing it with an escape character (in effect, using escape
# as the meta prefix). The default is On, but readline will set
# it to Off if the locale contains eight-bit characters.
# enable-meta-key (On)
# When set to On, readline will try to enable any meta modifier
# key the terminal claims to support when it is called. On many
# terminals, the meta key is used to send eight-bit characters.
#
#
# Eight bit compatible: Umlaute
set meta-flag on
set input-meta on
set output-meta on
set convert-meta off
set enable-meta-key off
#
# editing-mode (emacs)
# Controls whether readline begins with a set of key bindings sim-
# ilar to Emacs or vi. editing-mode can be set to either emacs or
# vi.
# *Vim is nice but not in a shell.
#set editing-mode emacs
#
# show-mode-in-prompt (Off)
# If set to on, inserts a string at the start of the line to indicate
# which Vi mode we're in (insert or command)
# *On is useful sometimes when in vi mode.
#set show-mode-in-prompt off
#
# echo-control-characters (On)
# When set to On, on operating systems that indicate they support
# it, readline echoes a character corresponding to a signal gener-
# ated from the keyboard
# *Show stuff like ^C on failed commands or insert mode.
#set echo-control-characters on
#
# bell-style (audible)
# Controls what happens when readline wants to ring the terminal
# bell. If set to none, readline never rings the bell. If set to
# visible, readline uses a visible bell if one is available. If
# set to audible, readline attempts to ring the terminal's bell.
# *Never ever beep ever.
set bell-style none
#
# show-all-if-ambiguous (Off)
# This alters the default behavior of the completion functions.
# If set to On, words which have more than one possible completion
# cause the matches to be listed immediately instead of ringing
# the bell
# *Single tab WITH prefix matches
set show-all-if-ambiguous on
#
# show-all-if-unmodified (Off)
# This alters the default behavior of the completion functions in
# a fashion similar to show-all-if-ambiguous. If set to On, words
# which have more than one possible completion without any possi-
# ble partial completion (the possible completions don't share a
# common prefix) cause the matches to be listed immediately
# instead of ringing the bell.
# *Single tab WITHOUT prefix matches
set show-all-if-unmodified on
#
# page-completions (On)
# If set to On, readline uses an internal more-like pager to dis-
# play a screenful of possible completions at a time.
# *Disable annoying 'more' pager.
set page-completions off
#
# completion-query-items (100)
# Sets maximum number of completion entries before asking to show all.
# *Threshold for "Display all nnn possibilities? (y or n)"
set completion-query-items 500
#
# completion-ignore-case (Off)
# If set to On, readline performs filename matching and completion
# in a case-insensitive fashion.
# *Show completion matches for annoying mixed case stuff
set completion-ignore-case on
#
# match-hidden-files (On)
# This variable, when set to On, causes readline to match files
# whose names begin with a `.' (hidden files) when performing
# filename completion. If set to Off, the leading `.' must be
# supplied by the user in the filename to be completed
# *May mess with some tab completion on dotfiles
set match-hidden-files on
#
# expand-tilde (Off)
# If set to On, tilde expansion is performed when readline
# attempts word completion.
# *Completes ~/<tab> to /home/foo/
#set expand-tilde on
#
# colored-stats (Off)
# If set to On, readline displays possible completions using dif-
# ferent colors to indicate their file type. The color defini-
# ions are taken from the value of the LS_COLORS environment
# variable.
# *Use $LS_COLORS for comp lists
set colored-stats on
#
# visible-stats (Off)
# If set to On, a character denoting a file's type as reported by
# stat(2) is appended to the filename when listing possible com-
# pletions.
# *Append classifier type to ALL completion lists like `ls -F`
#set visible-stats On
#
# menu-complete-display-prefix (Off)
# If set to On, menu completion displays the common prefix of the
# list of possible completions (which may be empty) before cycling
# through the list.
set menu-complete-display-prefix off
#
# colored-completion-prefix (Off)
# If set to On, when listing completions, readline displays the
# common prefix of the set of possible completions using a differ-
# ent color. The color definitions are taken from the value of
# the LS_COLORS environment variable.
set colored-completion-prefix on
#
# mark-directories (On)
# If set to On, completed directory names have a slash appended.
set mark-directories on
#
# mark-symlinked-directories (Off)
# If set to On, completed names which are symbolic links to direc-
# tories have a slash appended (subject to the value of
# mark-directories).
set mark-symlinked-directories on
#
# skip-completed-text (Off)
# Enable more intelligent inline autocompletion by examining the
# text after the cursor.
set skip-completed-text on
#
#bind "set meta-flag on"
#bind "set input-meta on"
#bind "set output-meta on"
#bind "set convert-meta off"
#bind "set enable-meta-key off"
#bind "set bell-style none"
#bind "set show-all-if-ambiguous on"
#bind "set show-all-if-unmodified on"
#bind "set page-completions off"
#bind "set completion-query-items 500"
#bind "set completion-ignore-case on"
#bind "set match-hidden-files on"
#bind "set colored-stats on"
#bind "set menu-complete-display-prefix off"
#bind "set colored-completion-prefix on"
#bind "set mark-directories on"
#bind "set mark-symlinked-directories on"
#bind "set skip-completed-text on"
#
#
# end
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment