shell: bash readline prefix history search via XDG inputrc

Add $INPUTRC pointing at ~/.config/readline/inputrc and ship that file
with history-search Up/Down bindings (cursor to end), mirroring zsh's
history-beginning-search-end. zsh ignores readline, so this is bash-side
only. Includes /etc/inputrc to keep distro defaults.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 11:26:58 +02:00
parent 9262c9795a
commit 5002a409f9
2 changed files with 16 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
# Readline config (bash line editing + any readline program: python, psql...).
# Set via $INPUTRC; see shell/exports. zsh ignores this (uses ZLE); its
# equivalent prefix-search bindings live in zsh/.zshrc.
#
# Pull in distro defaults; a custom INPUTRC otherwise replaces them entirely.
$include /etc/inputrc
# zsh-style prefix history search: type a prefix, Up/Down walk matching
# history entries with cursor at end of line. Empty prefix = previous/next.
"\e[A": history-search-backward
"\e[B": history-search-forward
"\eOA": history-search-backward
"\eOB": history-search-forward