From f584cf38f719b0040b1b81115cab891859bd2c63 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 11 Apr 2026 17:02:34 +0900 Subject: [PATCH] [bash] Persist history deletion when histappend is on Fix #4764 Patch suggested by @bitraid. --- shell/key-bindings.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/key-bindings.bash b/shell/key-bindings.bash index 743b3a33..24ba708d 100644 --- a/shell/key-bindings.bash +++ b/shell/key-bindings.bash @@ -84,6 +84,10 @@ __fzf_history_delete() { for offset in "${offsets[@]}"; do builtin history -d "$offset" done + + if [[ ${#offsets[@]} -gt 0 ]] && shopt -q histappend; then + builtin history -w + fi } if command -v perl > /dev/null; then