-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.inputrc
95 lines (89 loc) · 2.19 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
#
# .inputrc
#
# When this file is changed, it will only reflect the changes for newly
# opened shells. For existing shells, do:
#
# $ bind --file ~/.inputrc
#
# Search for ‘re-read-init-file’ in ‘man bash’ and/or see this:
#
# http://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Command-Line-Editing
#
##
# Expand bash aliases
# ===================
#
# https://superuser.com/questions/247770/how-to-expand-aliases-inline-in-bash
#
# By using an alias we lose the hability to use shipped bash
# completions. If we have, for example:
#
# alias ls='ls --color=auto --classify'
#
# When we do
#
# ls --<Tab><Tab>
#
# we DO NOT get the possible option completions. Therefore, it is
# sometimes useful to expand the alias to the original command so the
# shell completions kick in and we can benefit from this very useful
# feature.
#
# Usage:
#
# 1. Create an alias like
#
# $ alias dc='docker-compose '
#
# The trailing space in the example is on purpose so after the alias is
# expanded, we get the space to separate the command from the remaining
# arguments.
#
# 2. On the terminal running bash (not sure if it works on other
# shells), type this:
#
# $ dc Esc e
#
# It then expands to
#
# $ docker-compose␠
#
# (there is a trailing space after the “e” in “compose”).
#
# 3. Type the rest of the command 😄. For example:
#
# $ docker-compose Esc e up --build --detach
#
# NOTE: Spaces after the alias are NOT necessary before hitting the key
# combination that expands the alias.
#
# Press ‘Esc e’ or ‘Ctrl-[ e’
#
"\ee": alias-expand-line
#
# Or press ‘Esc Tab’ or ‘Ctrl-[ Tab’.
#
"\e\t": alias-expand-line
##
# When there more than one match, automatically show the available
# completions at point without requiring `Tab Tab'.
#
set show-all-if-ambiguous off
##
# Always insert an item at the command line. Further `Tab' presses cycle
# between other possible completions.
#
# TAB:menu-complete
##
##
# Clear scrollback and redraw current line.
#
# • https://github.com/gnome-terminator/terminator/issues/703
#
# We can do this, but C-M-l already exists that does the same so I'll
# leave the defaults, which are good enough.
#
# "\C-l": clear-display
##
# vim: set tw=72: