-
Notifications
You must be signed in to change notification settings - Fork 1
/
.inputrc
101 lines (77 loc) · 2.98 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
# This ~/.inputrc is used by the readline library
# Note that ZSH does not use readline, so these settings don't apply to ZSH
# But these do apply to Bash
# Note that:
# \e => escape (not a modifier key, but representing a portion of the keycode, like arrow down is \e[B)
# \C => control
# \M => meta/alt
# Ring the bell visibly
set bell-style visible
# Make Tab autocomplete apply insensitivity to case
set completion-ignore-case On
# Make Tab autocomplete apply insensitivity to hyphens and underscores
set completion-map-case On
# List all matches in case multiple possible completions are possible
set show-all-if-ambiguous on
# Immediately add a trailing slash when autocompleting directories or symlinks to directories
set mark-directories on
set mark-symlinked-directories on
# Use the text that has already been typed as the prefix for searching through
# commands (i.e. more intelligent Up/Down behavior)
# Use Up/Down keys for prefix history search
"\e[A": history-search-backward
"\e[B": history-search-forward
# incremental history search, both reverse and forward with Ctrl-r/]
"\C-r": reverse-search-history
"\C-]": forward-search-history
# Do not autocomplete hidden files unless the pattern explicitly begins with a dot
set match-hidden-files off
# If there are more than 100 possible completions for a word, ask to show them all
set completion-query-items 100
# Show extra file information when completing, like `ls -F` does
set visible-stats on
set colored-stats On
# 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". (This is supported by the
# Readline used by Bash 4.)
set skip-completed-text on
# Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456'
set input-meta on
set output-meta on
set convert-meta off
# Equivalent to "\C-?": delete-char
"\e[3~": delete-char
# VT
"\e[1~": beginning-of-line
"\e[4~": end-of-line
# kvt
"\e[H": beginning-of-line
"\e[F": end-of-line
# rxvt and konsole (i.e. the KDE-app...)
"\e[7~": beginning-of-line
"\e[8~": end-of-line
# VT220
"\eOH": beginning-of-line
"\eOF": end-of-line
$if Bash
# Expand the ~
set expand-tilde on
# Do history expansion on !$/!^/!!/!* when space is pressed
Space: magic-space
# Shift Enter creates a quoted insert for literal newline which doesn't execute the command
# It also adds a \ for Bash to escape the newline.
# The advantage is that you can completely edit the multiline command
# This can actually be used for any readline compatible REPL
# For Konsole:
"\eOM":"\\\C-v\C-j"
# For Cygwin Mintty:
"\C-j":"\\\C-v\C-j"
# Xterm and Gnome-Terminal and Any terminal that Only gives ^M is out of luck
# Shift Tab creates a quoted insert for literal tab
# For Konsole:
# ...?
# For Cygwin Mintty (Shift + Tab):
"\e[Z":"\C-v\C-i"
$endif