Compare commits

..

2 Commits

Author SHA1 Message Date
daniil-berg 634f4950f0 Add README 2026-06-29 11:27:50 +02:00
daniil-berg 5002a409f9 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>
2026-06-29 11:26:58 +02:00
3 changed files with 39 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
# dotfiles
Designed around [GNU stow][gnu stow manual].
For `zsh` or `bash` (or both). Include `shell/` always.
## Install
```sh
git clone <repo> ~/.dotfiles
cd ~/.dotfiles
stow shell zsh # or: stow shell bash
```
## Update
```sh
cd ~/.dotfiles
git pull
stow -R shell zsh # restow this host's packages
```
[gnu stow manual]: https://www.gnu.org/software/stow/manual/stow.html
+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
+3
View File
@@ -33,5 +33,8 @@ export PYTHON_HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/python/history"
# Wget config file # Wget config file
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/rc" export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/rc"
# Readline config file (bash line editing + any readline program)
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/readline/inputrc"
# NOTE: ZDOTDIR lives in ~/.zshenv, not here. It must be set before zsh reads # NOTE: ZDOTDIR lives in ~/.zshenv, not here. It must be set before zsh reads
# any rc file, and this file is sourced too late for that. # any rc file, and this file is sourced too late for that.