aboutsummaryrefslogtreecommitdiff
path: root/readline/inputrc
blob: c4c1eb4f9e684f38f4cd9a41f24a830dc70c80ac (plain) (blame)
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
# Never ring any sort of bell during line reading
set bell-style none

# Ignore case when matching and completing paths
set completion-ignore-case On

# Treat underscores and hyphens the same way for completion purposes
set completion-map-case On

# Show me up to 5,000 completion items, don't be shy
set completion-query-items 5000

# Don't display control characters like ^C if I input them
set echo-control-characters Off

# Expand tilde to full path on completion
set expand-tilde On

# Add a trailing slash for completed symlink directories
set mark-symlinked-directories On

# Don't paginate possible completions
set page-completions Off

# Show multiple completions on first tab press
set show-all-if-ambiguous On

# Don't re-complete already completed text in the middle of a word
set skip-completed-text On

# Bash macros
$if Bash
    # Expand ! history with a spacebar press
    Space: magic-space
    # Alt-E (for exec) to prepend "exec " to a command and return to the end of
    # the line
    "\ee": "\C-aexec \C-e"
    # Alt-H (for home) to go $HOME
    "\eh": "\C-ucd\C-j\C-y"
    # Alt-L (for ls) to run ls -Al
    "\el": "\C-uls -Al\C-j\C-y"
    # Alt-M (for muxer) to run tmux
    "\em": "\C-utmux\C-j\C-y"
    # Alt-P (for procedure) to wrap current command in () { ... ; } and go to
    # the start of the line
    "\ep": "\C-a() { \C-e ; }\C-a"
    # Alt-R (for repeat) to run the previous command in history again
    "\er": "\C-u\C-p\C-j\C-y"
    # Alt-S (for set) to wrap current command in (set -x ; ...)
    "\es": "\C-a(set -x ; \C-e)\C-b"
    # Alt-T (for todo) to edit my to-do file with td(1)
    "\et": "\C-atd\C-j\C-y"
$endif