# This file controls the behaviour of line input editing for
# programs that use the GNU Readline library.  Existing
# programs include FTP, Bash, and GDB.
#
# See 'man bash' >> READLINE for documentation on all the readline options and commands.
# You can use 'bind' (bash built-in command) to view current readline config:
#   bind -p ... Display readline function names and bindings in such a way that they can be re-read.
#   bind -P ... List current readline function names and bindings.
#   bind -V ... List current readline variable names and values.
#   (See 'man bash' >> SHELL BUILTIN COMMANDS for additional details...)
# You can re-read the inputrc file with C-x C-r (re-read-init-file).

set bell-style visible
set expand-tilde off
set input-meta off
set convert-meta on
set output-meta off
set horizontal-scroll-mode off
set history-preserve-point on
set mark-directories on
set mark-symlinked-directories on
set match-hidden-files off

# completion settings
set page-completions off
set completion-query-items 2000
set completion-ignore-case off
set show-all-if-ambiguous on
set show-all-if-unmodified on
set completion-prefix-display-length 10
set print-completions-horizontally off

set editing-mode emacs

# reload file
"\C-x\C-r": re-read-init-file

C-n: history-search-forward
C-p: history-search-backward

$if mode=emacs

"\e[A": history-search-backward
"\e[B": history-search-forward

# for linux console and RH/Debian xterm
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
"\e[1;5C": forward-word
"\e[1;5D": backward-word

# for rxvt
$if term=rxvt
"\e[8~": end-of-line
"\eOc": forward-word
"\eOd": backward-word
$endif

# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
"\eOH": beginning-of-line
"\eOF": end-of-line

# for freebsd console
"\e[H": beginning-of-line
"\e[F": end-of-line

$endif