-
Notifications
You must be signed in to change notification settings - Fork 0
/
.inputrc
68 lines (55 loc) · 2.59 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
#!/bin/bash
# When listing possible file completions,
# put / after directory names and * after programs
set visible-stats on
# If set to ‘on’, performs filename matching and completion in
# a case-insensitive fashion.
set completion-ignore-case On
# 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 2
# If set to ‘on’, completed names which are symbolic links to directories have
# a slash appended (subject to the value of mark-directories).
set mark-symlinked-directories On
# 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.
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.
set show-all-if-unmodified On
# Auto-expand any ! combinations when you hit space
$if Bash
Space: magic-space
$endif
# By default up/down are bound to previous-history
# and next-history respectively. The following does the
# same but gives the extra functionality where if you
# type any text (or more accurately, if there is any text
# between the start of the line and the cursor),
# the subset of the history starting with that text
# is searched.
# Note to get rid of a line just Ctrl-C
"\e[B": history-search-forward
"\e[A": history-search-backward
# Don't echo ^C etc (new in bash 4.1)
# Note this only works for the command line itself,
# not if already running a command.
set echo-control-characters off
# Similar to complete, but replaces the word to be completed with a single
# match from the list of possible completions. Repeated execution of
# menu-complete steps through the list of possible completions.
TAB: menu-complete
# Bind menu-complete-backward on Shift + Tab
"\e[Z": "\e-1\C-i"
# Move cursor on one word back/forward on Option + Arrow Left/Right
"\e\e[D": backward-word
"\e\e[C": forward-word
# Be more intelligent when autocompleting by also looking at the text after
# the cursor. For example, when the current line is "cd ~/src/mozil", and
# the cursor is on the "z", pressing Tab will not autocomplete it to "cd
# ~/src/mozillail", but to "cd ~/src/mozilla".
set skip-completed-text on