# 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. Empty prefix = previous/next.
#
# Bind arrows straight to the search functions. Do NOT wrap in a macro that
# appends end-of-line (\C-e) to mimic zsh's cursor-at-end: \C-e moves point to
# the line end, and history-search-* takes its prefix from start-of-line to
# point -- so the next press searches for the whole recalled line, finds
# nothing, and Up/Down go dead. Pure readline has no history-search-end widget;
# cursor lands at the prefix boundary, which is readline's intended behavior.
"\e[A": history-search-backward
"\e[B": history-search-forward
"\eOA": history-search-backward
"\eOB": history-search-forward
