-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_inputrc
92 lines (73 loc) · 2.81 KB
/
dot_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
# """
# Readline input configuration for Bash.
#
# @note Updated 2025-01-03.
#
# @seealso
# - http://ss64.com/bash/syntax-inputrc.html
# - https://github.com/alrra/dotfiles/blob/main/src/shell/inputrc
# - https://github.com/thcipriani/dotfiles/blob/master/inputrc
# - https://stackoverflow.com/questions/12044574/
# - https://github.com/Bash-it/bash-it/issues/894
# """
# Disable beeping and window flashing.
set bell-style none
# Make Tab autocomplete regardless of filename case.
set completion-ignore-case on
# If there are more than n possible completions for a word, ask to show.
set completion-query-items 50
# Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456'.
set convert-meta off
set input-meta on
set output-meta on
# Use the 'vi' set of key bindings (default is 'emacs').
set editing-mode vi
# Enable trailing slash '/' on tab auto-completion of directory names.
# See also:
# - https://unix.stackexchange.com/questions/25734
# - https://askubuntu.com/questions/900923
set mark-directories on
set mark-symlinked-directories on
# Do not autocomplete hidden files unless the pattern begins with a dot.
set match-hidden-files off
# Perform partial completion on the first TAB press, and only start cycling full
# results on the second TAB press.
set menu-complete-display-prefix on
# Don't show all autocomplete results at once.
set page-completions on
# Display all possible matches for an ambiguous pattern at first Tab.
set show-all-if-ambiguous on
# Display the list of matches when no further completion is possible.
set show-all-if-unmodified 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'.
set skip-completed-text on
# Show extra file information when completing, like 'ls -F' does.
set visible-stats on
# If there are multiple matches for completion, make Tab cycle through them.
# - Cycle forward: Tab
# - Cycle backward: Shift-Tab
TAB: menu-complete
"\e[Z": menu-complete-backward
# Make Ctrl-q display the list of possible completions.
Control-q: complete
# Bind traditional autocompletion to Ctrl+Tab.
Control-Tab: complete
# Use Alt/Meta + Delete to delete the preceding word.
"\e[3;3~": kill-word
# Cycle through previously used commands with Up and Down arrow.
# > "\e[A": history-search-backward
# > "\e[B": history-search-forward
# Use the text that has already been typed as the prefix for searching through
# commands (i.e. more intelligent up/down behavior). Partial matching.
$if mode=vi
set keymap vi-command
"\e[A": history-search-backward
"\e[B": history-search-forward
set keymap vi-insert
"\e[A": history-search-backward
"\e[B": history-search-forward
"\C-l":'clear\n'
$endif