fix hstr not available

This commit is contained in:
2026-07-14 12:26:52 +02:00
parent c3916abfd9
commit 717f099dc3
+8 -6
View File
@@ -31,12 +31,14 @@ export HISTCONTROL=ignoreboth:erasedups # no duplicate entries
export HISTFILESIZE=2500000 export HISTFILESIZE=2500000
export HISTSIZE=250000 export HISTSIZE=250000
# ensure synchronization between bash memory and history file if type hstr >/dev/null 2>&1; then
export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}" # ensure synchronization between bash memory and history file
if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hstr -- \C-j"'; fi export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
# if this is interactive shell, then bind 'kill last command' to Ctrl-x k if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hstr -- \C-j"'; fi
if [[ $- =~ .*i.* ]]; then bind '"\C-xk": "\C-a hstr -k \C-j"'; fi # if this is interactive shell, then bind 'kill last command' to Ctrl-x k
export HSTR_TIOCSTI=y if [[ $- =~ .*i.* ]]; then bind '"\C-xk": "\C-a hstr -k \C-j"'; fi
export HSTR_TIOCSTI=y
fi
# If not running interactively, don't do anything # If not running interactively, don't do anything
case $- in case $- in