-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.inputrc
48 lines (43 loc) · 1.55 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
$include /etc/inputrc
$if Bash
Space: magic-space
$endif
# Completion https://www.topbug.net/blog/2017/07/31/inputrc-for-humans/
"\C-p": history-search-backward
"\C-n": history-search-forward
set blink-matching-paren On
set colored-stats On # use LS_COLORS
set completion-ignore-case On
set completion-map-case On # _ and - are the same
set completion-prefix-display-length 3
set mark-symlinked-directories On
set match-hidden-files On
set menu-complete-display-prefix on
set show-all-if-ambiguous On
set show-all-if-unmodified On
set show-mode-in-prompt On
set visible-stats On
TAB: menu-complete
"\e\C-w": alias-expand-line
"\e\C-u": kill-whole-line #kill-whole-line
# https://news.ycombinator.com/item?id=24659282
# 1. Insert last command quoted, move to beggining, add "#", execute
# !:q \C-a#\C-j
# 2. Insert last command quoted, add ">> .alias && source ~/.alias" to the end, move to beggining
# !:q >> ~/.alias && source ~/.alias \C-a
# 3. Type "echo " move forward two characters, delete "#"
# echo \C-f\C-f\C-h
# 4. Type "alias =" move back one character
# alias =\C-b
"\e\C-p": "!:q \C-a#\C-j!:q >> ~/.alias && source ~/.alias\C-aecho \C-f\C-f\C-halias =\C-b"
# Create temporary alias
"\e\C-a": "!:q \C-aalias alias=\C-b"
# Store last command (see above)
"\e\C-s": "echo !:q >> ~/.alias\C-j"
# F1, F2, F3 - calls alias1, alias2, alias3, helpful if you are executig the same ommands over and over
"OP": "alias1\r"
"OQ": "alias2\r"
"OR": "alias3\r"
# F12 Universal help
#"\e[24~": "vim ~/git/dot-files/help/shell.txt\r"
"\e[24~":"\C-auniversalHelp \ef\C-k\n"