-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.inputrc
110 lines (89 loc) · 2.79 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
#---------------------------Key Bindings--------------------------------
# up => {search/move} backward in the history entries
"\e[A": history-search-backward
# down => {search/move} forward in the history entried
"\e[B": history-search-forward
# right => move forward by one character
"\e[C": forward-char
# left => move backward by one character
"\e[D": backward-char
# Ctrl + right => move forward by one word
"\e[1;5C": forward-word
"\e[5C": forward-word
"\e\e[C": forward-word
# Ctrl + left => move backward by one word
"\e[1;5D": backward-word
"\e[5D": backward-word
"\e\e[D": backward-word
# 'HOME' => move to the beginning of the line
"\e[1~": beginning-of-line
# 'END' => move to the end of the line
"\e[4~": end-of-line
# 'PageUp'
"\e[5~": beginning-of-history
# 'PageDown'
"\e[6~": end-of-history
# 'INS' => insert next typed key literally
"\e[2~": quoted-insert
# 'DEL' => delete current char under the cursor
"\e[3~": delete-char
#-------------- <Ctrl-key> mappings-------------------#
#
# Ctrl + p => move to previous history entry
"\C-p": previous-history
# Ctrl + n => move to next history entry
"\C-n": next-history
# edit the PATH env
"\C-xp": "PATH=${PATH}"
#-------------- <Alt-key> mappings-------------------#
#
# navigate history
#"\ep": previous-history
#"\en": next-history
# search history
"\ej": history-search-backward
# move within line
"\eh": backward-char
"\el": forward-char
"\ef": forward-word
"\eb": backward-word
# insert the last argument of previous command
"\ek": yank-last-arg
# insert a pair of quotes
"\e\"": "\"\"\C-b"
"\e'": "''\C-b"
"\e(": "()\C-b"
"\e`": "``\C-b"
# Quote current or previous word with double quotes
"\eq": "\eb\"\ef\""
#-------------- <Ctrl-Alt-key> mappings-------------------#
#
# append '|less ' into command
"\e\C-l":"\C-e | less\C-m"
# execute in background ,with all output discarded
"\e\C-b":"\C-e > /dev/null 2>&1 &\C-m"
#---------------------------Readline Options--------------------------------
# use the key-bindings of vim style
#set editing-mode vi
# list all candidates instead of ring the bell, when completing
set show-all-if-ambiguous on
# append single type character to each completion candidates.
set visible-stats on
# perform name completion in case-insensitive way.
#set completion-ignore-case on
# Completed dir names have a slash appended
set mark-directories on
# Completed names which are symlinks to dirs have a slash appended
set mark-symlinked-directories on
# never ring the bell!
set bell-style none
# allow eight-bit input, do not strip the high bit
set input-meta on
# do not strip the eighth bit
set convert-meta off
# display characters with the eighth bit set directly
set output-meta on
# specific for gdb
#$if gdb
#set editing-mode vi
#$endif