-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.inputrc
More file actions
263 lines (215 loc) · 7.47 KB
/
.inputrc
File metadata and controls
263 lines (215 loc) · 7.47 KB
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
#####
# ~/.inputrc -- startup file for readline
#
# @author Pat Gaffney <pat@hypepat.com>
# @created 2016-09-17
# @modified 2016-09-17
#
# This file is loaded by the Readline library. It sets defaults
# for variable settings, key bindings, and behavior.
#
#####################################################################
#####################################################################
# @section Run-Time Behavior
#####################################################################
# Use a visible bell instead of an audible one.
# - OPTIONS: visible, none, audible
# - DEFAULT: audible
set bell-style visible
# Bind control characters to their Readline equivalents.
# - OPTIONS: on, off
# - DEFAULT: on
set bind-tty-special-chars on
# Display possible completions using different colors to indicate
# their file type. Color definitions are taken from the value of
# $LS_COLORS environment variable.
# - OPTIONS: on, off
# - DEFAULT: off
set colored-stats on
# String to insert at the beginning of the line when
# `insert-comment` command is executed.
# - OPTIONS: any valid string
# - DEFAULT: "#"
set comment-begin "#"
# 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.
# - OPTIONS: any valid signed integer
# - DEFAULT: -1
set completion-display-width -1
# Perform case-insensitive filename matching and completion.
# - OPTIONS: on, off
# - DEFAULT: off
set completion-ignore-case on
# Treat hypens `-` and underscores `_` as equivalent when performing
# case-insensitive filename matching and completion.
# - OPTIONS: on, off
# - DEFAULT: off
set completion-map-case off
# 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 0, common prefixes longer than this value are
# replaced with an ellipsis.
# - OPTIONS: any valid signed integer
# - DEFAULT: 0
set completion-prefix-display-length 0
# Number of possible completions that determines when the user is
# asked to display the entire list of possibilities.
# - OPTIONS: any valid signed integer
# - DEFAULT: 100
set completion-query-items 20
# Convert characters with the eigth bit set to an ASCII key sequence
# by stripping the eigth big and prefixing an `ESC` character,
# converting them to a meta-prefixed key sequence
# - OPTIONS: on, off
# - DEFAULT: one
set convert-meta on
# Disable word completion
# - OPTIONS: on, off
# - DEFAULT: off
set disable-completion off
# Controls which default key bindings to use.
# - OPTIONS: emacs, vi
# - DEFAULT: emacs
set editing-mode emacs
# Echo a character corresponding to a signal generated
# by the keyboard.
# - OPTIONS: on, off
# - DEFAULT: on
set echo-control-characters off
# Enable the application keypad when it is called.
# - OPTIONS: on, off
# - DEFAULT: off
set enable-keypad off
# Enable any meta modifier key the terminal claims to support.
# - OPTIONS: on, off
# - DEFAULT: on
set enable-meta-key on
# Perform tilde expansion when Readline attempts word completion.
# - OPTIONS: on, off
# - DEFAULT: off
set expand-tilde off
# Place the current cursor position at the same location on each
# history line retrieved with `previous-history` or `next-history`.
# - OPTIONS: on, off
# - DEFAULT: off
set history-preserve-point off
# Set the maximum number of history entries saved in history list.
# - OPTIONS: any valid signed integer
# - DEFAULT: 500
set history-size 5000
# Scroll the current line of text being edited horizontally.
# - OPTIONS: on, off
# - DEFAULT: off
set horizontal-scroll-mode off
# Enable eight-bit input.
# - OPTIONS: on, off
# - DEFAULT: off
set input-meta off
# The string of characters that should terminate an incremental
# search without subsequently executing the character as a command.
# - OPTIONS: no value or a keystroke
# - DEFAULT: no value
# set isearch-terminators
# Set the current keymap for key binding commands.
# - OPTIONS: emacs, emacs-meta, emacs-ctlx, vi, vi-move, vi-insert
# - DEFAULT: emacs
set keymap emacs
# Specify a duration to wait for a character when reading an
# ambiguous key sequence.
# - OPTIONS: time in milliseconds
# - DEFAULT: 500
set keyseq-timeout 500
# Completed directory names have a slash appended.
# - OPTIONS: on, off
# - DEFAULT: on
set mark-directories on
# Mark history lines that have been modified.
# - OPTIONS: on, off
# - DEFAULT: off
set mark-modified-lines off
# Completed name which are symbolic links have a slash appended.
# - OPTIONS: on, off
# - DEFAULT: off
set mark-symlinked-directories off
# Match files whose names begin with a `.` (hidden files).
# - OPTIONS: on, off
# - DEFAULT: on
set match-hidden-files on
# Menu completion displays the common prefix of all possible
# completions before cycling through a list.
# - OPTIONS: on, off
# - DEFAULT: off
set menu-complete-display-prefix off
# Display character with the eighth-bit set directly rather than
# as a meta-prefixed escape sequence.
# - OPTIONS: on, off
# - DEFAULT: off
set output-meta off
# Use an internal `more`-like pager to display a screenful of
# possible completions at a time.
# - OPTIONS: on, off
# - DEFAULT: on
set page-completions on
# Display completions with matches sorted horizontally in
# alphabetical order, rather than down a screen.
# - OPTIONS: on, off
# - DEFAULT: off
set print-completions-horizontally off
# Undo all changes to history lines before returning when
# `accept-line` is executed.
# - OPTIONS: on, off
# - DEFAULT: off
set revert-all-at-newline off
# Words which have more than one possible completion cause the
# matches to be listed immediately instead of ringing the bell.
# - OPTIONS: on, off
# - DEFAULT: off
set show-all-if-ambiguous on
# Words which have more than one possible completion without any
# possible partial completion cause the matches to be listed
# immediately instead of ringing the bell.
# - OPTIONS: on, off
# - DEFAULT: off
set show-all-if-unmodified on
# Add a character to the beginning of the prompt indicating the
# editing mode: `@` for emacs, `:` for vi, `+` for vi-insertion.
# - OPTIONS: on, off
# - DEFAULT: off
set show-mode-in-prompt off
# Do 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.
# - OPTIONS: on, off
# - DEFAULT: off
set skip-completed-text off
# A character denoting a file's type is appending to the filename
# when listing possible completions.
# - OPTIONS: on, off
# - DEFAULT: off
set visible-stats off
#####################################################################
# @section Key Bindings
#
# macOS's Terminal.app allows you to edit your keycodes -- in
# other words, you can choose what happens when a set or series
# of complex keystokes is hit. In order for the codes to work
# with Readline, you need to set the action to "Send Text", and
# the text to the appropriate code.
#
# In all of the following codes: `\e` == `\033`
#####################################################################
$if mode=emacs
# Cntrl-left jumps to beginning of line
"\e[1;5D": beginning-of-line
# Cntrl-right jumps to end of line
"\e[1;5C": end-of-line
# Option-left jumps back a word
"\eb": backward-word
# Option-right jumps forward a word
"\ef": forward-word
# Backspace to backward-delete a character
"\e[3~": backward-delete-char
# Shift-backspace to forward-delete a character
"\e[3;5~": forward-backward-delete-char
$endif