-
Notifications
You must be signed in to change notification settings - Fork 12
/
.inputrc
80 lines (67 loc) · 2.29 KB
/
.inputrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# GNU readline's configuration file.
#
# This file controls the behaviour of line input editing for
# programs that use the GNU Readline library. Existing
# programs include FTP, Bash, and GDB.
#
# You can re-read the inputrc file with C-x C-r.
# Lines beginning with '#' are comments.
#
# Run: `bind -V` to list the current Readline variable names and values.
# Run: `bind -p` to list the current Readline function names and bindings.
#
# @see: http://cnswww.cns.cwru.edu/php/chet/readline/rluserman.html
# @see: https://www.gnu.org/software/bash/manual/html_node/Sample-Init-File.html#Sample-Init-File
#
# First, include any system-wide bindings and variable
# assignments from /etc/Inputrc
$include /etc/Inputrc
# Controls which default set of key bindings is used.
set editing-mode vi
# Definition of hot keys.
# <ctrl-m> = (enter)
# Hot key: <ctrl>-^
#"\C-^": "\C-a\C-kecho Pressed Ctrl-^\C-m"
"\C-q": "\C-aecho Pressed Ctrl-q\C-m"
# An old-style binding. This happens to be the default.
TAB: complete
# Macros that are convenient for shell interaction
$if Bash
# edit the path
"\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
# prepare to type a quoted word --
# insert open and close double quotes
# and move to just after the open quote
"\C-x\"": "\"\"\C-b"
# insert a backslash (testing backslash escapes
# in sequences and macros)
"\C-x\\": "\\"
# Quote the current or previous word
"\C-xq": "\eb\"\ef\""
# Add a binding to refresh the line, which is unbound
"\C-xr": redraw-current-line
# Edit variable on current line.
"\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
$endif
# Use a visible bell if one is available.
set bell-style visible
# Don't strip characters to 7 bits when reading (same as meta-flag).
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
# If there are more than 150 possible completions for
# a word, ask the user if he wants to see all of them.
set completion-query-items 150
# Readline performs filename matching and completion in a case-insensitive fashion.
# The default value is off.
set completion-ignore-case on
# For FTP.
$if Ftp
"\C-xg": "get \M-?"
"\C-xt": "put \M-?"
"\M-.": yank-last-arg
$endif