-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinputrc
243 lines (205 loc) · 9.83 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# 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’ (the default), Readline attempts to ring the
# terminal’s bell.
set bell-style none
# If set to ‘on’, Readline attempts to bind the control characters
# treated specially by the kernel’s terminal driver to their
# Readline equivalents.
set bind-tty-special-chars on
# The string to insert at the beginning of the line when the
# insert-comment command is executed. The default value is "#".
set comment-begin '#'
# The number of screen columns used to display possible matches
# when performing completion. The value is ignored if it is less
# than 0 or greater than the terminal screen width. A value of 0
# will cause matches to be displayed one per line. The default
# value is -1.
set completion-display-width -1
# If set to ‘on’, Readline performs filename matching and
# completion in a case-insensitive fashion. The default value is
# ‘off’.
set completion-ignore-case on
# If set to ‘on’, and completion-ignore-case is enabled, Readline
# treats hyphens (‘-’) and underscores (‘_’) as equivalent when
# performing case-insensitive filename matching and completion.
set completion-map-case on
# The length in characters of the common prefix of a list of
# possible completions that is displayed without modification.
# When set to a value greater than zero, common prefixes longer
# than this value are replaced with an ellipsis when displaying
# possible completions.
set completion-prefix-display-length 3
# The number of possible completions that determines when the user
# is asked whether the list of possibilities should be displayed.
# If the number of possible completions is greater than this
# value, Readline will ask the user whether or not he wishes to
# view them; otherwise, they are simply listed. This variable must
# be set to an integer value greater than or equal to 0. A
# negative value means Readline should never ask. The default
# limit is 100.
set completion-query-items 10000
# 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 an ESC character, converting them to a meta-prefixed
# key sequence. The default value is ‘on’.
set convert-meta true
# If set to ‘On’, Readline will inhibit word completion.
# Completion characters will be inserted into the line as if they
# had been mapped to self-insert. The default is ‘off’.
set disable-completion off
# The editing-mode variable controls which default set of key
# bindings is used. By default, Readline starts up in Emacs
# editing mode, where the keystrokes are most similar to Emacs.
# This variable can be set to either ‘emacs’ or ‘vi’.
set editing-mode emacs
# set editing-mode vi
# When set to ‘on’, on operating systems that indicate they
# support it, readline echoes a character corresponding to a
# signal generated from the keyboard. The default is ‘on’.
set echo-control-characters on
# 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. The default is ‘off’.
set enable-keypad off
# 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.
# The default is ‘on’.
set enable-meta-key on
# If set to ‘on’, tilde expansion is performed when Readline
# attempts word completion. The default is ‘off’.
set expand-tilde on
# If set to ‘on’, the history code attempts to place the point
# (the current cursor position) at the same location on each
# history line retrieved with previous-history or next-history.
# The default is ‘off’.
set history-preserve-point on
# Set the maximum number of history entries saved in the history
# list. If set to zero, the number of entries in the history list
# is not limited.
set history-size 0
# This variable can be set to either ‘on’ or ‘off’. Setting it to
# ‘on’ means that the text of the lines being edited will scroll
# horizontally on a single screen line when they are longer than
# the width of the screen, instead of wrapping onto a new screen
# line. By default, this variable is set to ‘off’.
set horizontal-scroll-mode off
# If set to ‘on’, Readline will enable eight-bit input (it will
# not clear the eighth bit in the characters it reads), regardless
# of what the terminal claims it can support. The default value is
# ‘off’. The name meta-flag is a synonym for this variable.
set input-meta off
# The string of characters that should terminate an incremental
# search without subsequently executing the character as a command
# (see Searching). If this variable has not been given a value,
# the characters ESC and C-J will terminate an incremental search.
# set isearch-terminators VALUE
# Sets Readline’s idea of the current keymap for key binding
# commands. Acceptable keymap names are emacs, emacs-standard,
# emacs-meta, emacs-ctlx, vi, vi-move, vi-command, and vi-insert.
# vi is equivalent to vi-command; emacs is equivalent to
# emacs-standard. The default value is emacs. The value of the
# editing-mode variable also affects the default keymap.
set keymap emacs
# If set to ‘on’, completed directory names have a slash appended.
# The default is ‘on’.
set mark-directories on
# This variable, when set to ‘on’, causes Readline to display an
# asterisk (‘*’) at the start of history lines which have been
# modified. This variable is ‘off’ by default.
set mark-modified-lines on
# If set to ‘on’, completed names which are symbolic links to
# directories have a slash appended (subject to the value of
# mark-directories). The default is ‘off’.
set mark-symlinked-directories 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. This
# variable is ‘on’ by default.
set match-hidden-files 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. The default is ‘off’.
set menu-complete-display-prefix on
# 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’.
# set output-meta VALUE
# If set to ‘on’, Readline uses an internal more-like pager to
# display a screenful of possible completions at a time. This
# variable is ‘on’ by default.
set page-completions off
# If set to ‘on’, Readline will display completions with matches
# sorted horizontally in alphabetical order, rather than down the
# screen. The default is ‘off’.
set print-completions-horizontally on
# If set to ‘on’, Readline will undo all changes to history lines
# before returning when accept-line is executed. By default,
# history lines may be modified and retain individual undo lists
# across calls to readline. The default is ‘off’.
set revert-all-at-newline 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. The default value is ‘off’.
set show-all-if-ambiguous on
# 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
# possible partial completion (the possible completions don’t
# share a common prefix) cause the matches to be listed
# immediately instead of ringing the bell. The default value is
# ‘off’.
set show-all-if-unmodified on
# If set to ‘on’, this alters the default completion behavior when
# inserting a single match into the line. It’s only active when
# performing completion in the middle of a word. If enabled,
# readline does not insert characters from the completion that
# match characters after point in the word being completed, so
# portions of the word following the cursor are not duplicated.
# For instance, if this is enabled, attempting completion when the
# cursor is after the ‘e’ in ‘Makefile’ will result in ‘Makefile’
# rather than ‘Makefilefile’, assuming there is a single possible
# completion. The default value is ‘off’.
set skip-completed-text on
# If set to ‘on’, a character denoting a file’s type is appended
# to the filename when listing possible completions. The default
# is ‘off’.
set visible-stats on
$if term=linux
set vi-ins-mode-string \1\e[?0c\2
set vi-cmd-mode-string \1\e[?8c\2
$else
set vi-ins-mode-string \1\e[6 q\2
set vi-cmd-mode-string \1\e[2 q\2
$endif
set show-mode-in-prompt off
# Color files by types
# Note that this may cause completion text blink in some terminals (e.g. xterm).
set colored-stats On
# Append char to indicate type
set visible-stats On
# Mark symlinked directories
set mark-symlinked-directories On
# Color the common prefix
set colored-completion-prefix On
# Color the common prefix in menu-complete
set menu-complete-display-prefix On
# Make Tab cycle between possible completions
TAB: menu-complete
"\e[Z": menu-complete-backward
Control-q: complete
$if gdb
"\e\C-l": "step\n"
"\e\C-j": "next\n"
"\e\C-i": "finish\n"
"\eK": "finish\n"
# Repeat second-previous
# "\e\C-u": "\C-p\C-p\C-m"
$endif
$if psql
set disable-completion off
$endif