# inputrc --- GNU readline configuration file
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1992-07-23
# Public domain

# $Id: inputrc,v 1.3 1997/12/31 09:55:33 friedman Exp $

# Commentary:

# Key bindings for Readline library routines (used by bash, gdb, etc.)
#
# Note that bindings here may override some `stty' settings; use the bash
# `bind' (bash 1.13 or later) command to change them.

# Code:

### Readline options

# Never beep.  Possible values are `none', `visible', and `audible'.
set bell-style none

# The value for rl_completion_query_items; the threshold above which the
# user is asked if he wants to see the possible completions.
set completion-query-items 10

# When `on', this means don't assume that a character with the 8th bit set
# is an ISO-8859-1 character, but rather a character with a meta prefix.
set convert-meta on

# If `on', don't do word completion, just self-insert.
set disable-completion off

set editing-mode emacs

# When set to `on', readline will try to enable the application keypad when
# it is called.  Some systems need this to enable the arrow keys.
set enable-keypad off

# Make readline perform tilde expansion when doing completion.
set expand-tilde off

set horizontal-scroll-mode off

# If set to `on', completed directory names have a slash appended.
set mark-directories on

# This variable, when set to `on', says to display an asterisk (`*') at the
# start of history lines which have been modified.
set mark-modified-lines off

# If set to `on', enable eight-bit input (it will not strip the eighth bit
# from the characters it reads), regardless of what the terminal claims it
# can support.  When off, check the line discipline settings.
# The name `meta-flag' is a synonym for this variable, set here also for
# older readline libraries (I think meta-flag was in use until bash 1.14).
set input-meta off
set meta-flag off

# If set to `on', Readline will display characters with the eighth bit set
# directly rather than as a meta-prefixed escape sequence.
set output-meta off

# If set to `on', words which have more than one possible completion cause
# the matches to be listed immediately instead of ringing the bell.
set show-all-if-ambiguous off

# If set to `on', a character denoting a file's type is appended to the
# filename when listing possible completions.
set visible-stats on

### Keymap settings

DEL: backward-delete-char
"\C-h": backward-delete-char

# Some godforsaken unix systems still make these the default interrupt and
# delete characters.  Welcome to the future.
"@": self-insert
"#": self-insert

"\C-q": quoted-insert
"\C-v": quoted-insert
"\C-u": unix-line-discard
"\C-w": backward-kill-word

"\C-g": abort
"\M-\C-g": abort
"\C-x\C-g": abort

"\C-p": previous-history
"\M-p": history-search-backward

"\C-n": next-history
"\M-n": history-search-forward

"\C-x\C-r": re-read-init-file
"\C-xd": dump-functions
"\M-\C-i": shell-expand-line

# Bash-specific bindings
$if Bash
# Adapted from a macro by bfox
"\C-xp": "PATH=:${PATH}\e\C-e\C-e\"\C-a\ef\C-f\""

# Edit value of variable.  usage: variable-name C-x e
"\C-xe": "\C-a\C-k$\C-y\e\C-e\"\C-a\C-y\ey=\""
$endif

# Bindings for fftp
$if Ftp
"\C-xg": "get \M-?"
"\C-xt": "put \M-?"
$endif

# For AIX 3.2's aixterm, which totally louses up the delete character.
$if TERM=aixterm
"\C-[[P": backward-delete-char
$endif

# inputrc ends here
