Add .inputrc and readline macros in bashrc

This commit is contained in:
Lexi / Zoe 2023-08-20 17:20:10 +02:00
parent 6d036476e4
commit 8e2c9918ab
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
2 changed files with 30 additions and 0 deletions

View File

@ -108,3 +108,9 @@ function b64dec() {
# Shortcuts for dig with less output
alias digs='dig +short'
alias digrr='dig +noall +answer'
# Readline macro Ctrl-Alt-L: Append "| less" to current command
bind '"\e\C-l": "\C-e | less"'
# Readline macro Ctrl-Alt-B: Append ">/dev/null 2>&1 &" to current command
bind '"\e\C-b": "\C-e >/dev/null 2>&1 &"'

24
.inputrc Normal file
View File

@ -0,0 +1,24 @@
# Include system defaults
$include /etc/inputrc
# Disable terminal bell
set bell-style none
# Enable colors for completion listings
set colored-completion-prefix on
set colored-stats on
# Enable case-insensitive completion
set completion-ignore-case on
# Show completion listing without double-Tab
set show-all-if-ambiguous on
# Don't keep changes to history lines
set revert-all-at-newline on
# Keybinding Alt-W: Like Ctrl-w but allowing slashes as word boundaries
"\ew": unix-filename-rubout
# Keybinding Alt-Tab: Cycle through completions
"\e\C-i": menu-complete