Move custom bash keybindings to separate inputrc

When bash is started without readline support, redefining bindings in .bashrc
yields warnings.  This is the case when starting bash as in Emacs' shell-mode,
among others.  Moving the keybindings to inputrc fixes this, and should make the
bindings available to all programs using readline.
This commit is contained in:
Daniel - 2020-07-25 11:45:08 +02:00
parent 83e3c4a53d
commit fed4dc8d38
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
2 changed files with 4 additions and 4 deletions

4
bashrc
View File

@ -26,10 +26,6 @@ shopt -s extglob
# Update the values of LINES and COLUMNS.
shopt -s checkwinsize
# Enable Emacs-style M-p and M-n behavior
bind '"\ep": history-search-backward'
bind '"\en": history-search-forward'
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

4
inputrc Normal file
View File

@ -0,0 +1,4 @@
# Enable Emacs-style M-p and M-n behavior
"\ep": history-search-backward
"\en": history-search-forward