diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-07 14:10:06 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-06-07 14:10:06 +0200 |
| commit | dc3b2f37b4d860590cc2b6c6ae61ed8d0ef1ed1f (patch) | |
| tree | 0a4aa4b0c01d69441374f8e095820c19482f66e8 | |
| parent | 8d179b5067d5e88d3012f369a18bdb1b118fc144 (diff) | |
| download | dotfiles-dc3b2f37b4d860590cc2b6c6ae61ed8d0ef1ed1f.tar.gz dotfiles-dc3b2f37b4d860590cc2b6c6ae61ed8d0ef1ed1f.zip | |
misc(bash): edit Readline settings and key mappings
| -rw-r--r-- | .config/bash/inputrc | 23 | ||||
| -rw-r--r-- | .config/bash/vi.inputrc | 5 |
2 files changed, 16 insertions, 12 deletions
diff --git a/.config/bash/inputrc b/.config/bash/inputrc index 6f72f65..a88ed4c 100644 --- a/.config/bash/inputrc +++ b/.config/bash/inputrc @@ -31,13 +31,13 @@ set show-all-if-ambiguous on set menu-complete-display-prefix on set editing-mode vi # Vi keybindings -set match-hidden-files off # Don't match hidden files, unless a leading '.' is typed explicitely +set match-hidden-files off # Don't match hidden files, unless a leading '.' is typed explicitly set completion-ignore-case on # Ignore case when matching completions set search-ignore-case on # Ignore case when searching set skip-completed-text on # Don't insert match when completing in the middle of a word set completion-query-items 100 # Prompt before showing more than this number of completions -set completion-display-width 100 # 100 columns for completion results -set print-completions-horizontally off # Sort completions horizontally +set completion-display-width -1 # Use all available width to show completions +set print-completions-horizontally on # Sort completions horizontally set colored-stats on # Show completions using colors depending on file type set visible-stats on # Append a character denoting file type set colored-completion-prefix on # Color the common prefix of completions @@ -63,21 +63,24 @@ $if mode=vi set keymap vi-insert $include ~/.config/bash/vi.inputrc -"\e\t": shell-expand-line # Alt+Tab perform shell expansion "\C-i": menu-complete # Tab cycle completions forward "\e[Z": menu-complete-backward # Shift+Tab cycle completions backward "\C-a": insert-completions # Ctrl+a insert all completions -"\e!": dynamic-complete-history # Alt+! complete from history entries (not lines!) + +"\eE": shell-expand-line # Alt+E shell expansion +"\e/": complete-filename # Alt+/ filename expansion +"\e~": complete-username # Alt+~ username expansion +"\e$": complete-variable # Alt+$ variable expansion +"\e@": complete-hostname # Alt+@ hostname expansion +"\e!": complete-command # Alt+! command expansion +"\e\t": dynamic-complete-history # Alt+Tab history entry (not lines!) expansion + "\eh": backward-char # Alt+h one char backward "\el": forward-char # Alt+l one char forward "\C-b": beginning-of-line # Ctrl+b beginning of line "\C-e": end-of-line # Ctrl+e end of line -$if Bash - -"\ee": "ranger\r" # Alt+e open `ranger` - -$endif +"\ee": "ranger\r" # Alt+e open `ranger` # vi-command ___________________________________________________________________ set keymap vi-command diff --git a/.config/bash/vi.inputrc b/.config/bash/vi.inputrc index aa5adf2..5ce0fb6 100644 --- a/.config/bash/vi.inputrc +++ b/.config/bash/vi.inputrc @@ -2,7 +2,8 @@ "\C-l": clear-screen # Ctrl+l clear screen "\C-w": unix-filename-rubout # Ctrl+w erase word backward (hyphens included) -"\C-k": history-search-backward # Ctrl+k search history backward (non-incremental) -"\C-j": history-search-forward # Ctrl+j search history forward (non-incremental) +"\C-k": kill-line # Ctrl+k kill line after point +"\C-p": history-search-backward # Ctrl+p search history backward (non-incremental) +"\C-n": history-search-forward # Ctrl+n search history forward (non-incremental) # vim: ft=readline |
