-
Notifications
You must be signed in to change notification settings - Fork 0
/
inputrc_config
74 lines (58 loc) · 2.64 KB
/
inputrc_config
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
# This is a customized configuration of GNU Readline, the input related
# library used by bash and most other shells. It is the startup file that
# deals with the mapping of the keyboard for certain situations.
# Include definitions from /etc/inputrc
$include /etc/inputrc
### History search
# Mappings to have [CTRL] + [UP] and [CTRL] + [DN] search through history
# for the string of characters between the start of the current line
# and the current cursor position.
# The search string must match at the beginning of a history line (startswith)
"\e[1;5A": history-search-backward
"\e[1;5B": history-search-forward
# Mappings to have [SHIFT] + [UP] and [SHIFT] + [DN] search through history
# for the string of characters between the start of the current line
# and the current cursor position.
# The search string may match anywhere in a history line (contains)
"\e[1;2A": history-substring-search-backward
"\e[1;2B": history-substring-search-forward
#########################################
### Auto-complete
# First [TAB] gives listing.
# Subsequent [TAB] and [SHIFT]+[TAB] cycle through all the possible completions.
"\t": menu-complete
"\e[Z": menu-complete-backward
set show-all-if-ambiguous On
set menu-complete-display-prefix on
# [TAB] for plain listing (default)
# "\t": complete
# [TAB] and [SHIFT]+[TAB] cycle through all the possible completions. No listing.
# "\t": menu-complete
# "\e[Z": menu-complete-backward
# set show-all-if-ambiguous Off
#########################################
### Deletion
# Sets [ALT]+[BACKSPACE] to delete word before cursor
"\e\C-h": backward-kill-word
# Sets [ALT]+[DEL] to delete word after cursor. (Alt+D by default)
"\e[3;3~": kill-word
#########################################
# sets readline to display possible completions using different
# colors to indicate their file types
set colored-stats On
# sets auto completion to ignore cases
set completion-ignore-case On
# sets 3 to be the maximum number of characters to be the common prefix
# to display for completions. If the common prefix has more than 3 characters,
# they are replaced by ellipsis.
set completion-prefix-display-length 3
# sets the completions to be listed immediately instead of ringing the bell,
# when the completing word has more than one possible completion.
# set show-all-if-ambiguous Off
# sets the completions to be listed immediately instead of ringing the bell,
# when the completing word has more than one possible completion but no
# partial completion can be made.
set show-all-if-unmodified On
# sets completions to be appended by characters that indicate
# their file types reported by the `stat` system call.
set visible-stats On