mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
functions/history.fish: also save when called with --exact
After deleting a history item with
history delete --exact --case-sensitive the-item
it is still reachable by history search until the shell is restarted.
Let's fix this by saving history after each deletion. The non-exact variants
of "history delete" already do this. I think this was just an oversight
owed to the fact that hardly anyone uses "--exact" (else we would surely
have changed it to not require an explicit "--case-sensitive").
(cherry picked from commit 326e62515b
)
Fixes #10066
This commit is contained in:
parent
36ed2b79c2
commit
b11db052cb
1 changed files with 1 additions and 0 deletions
|
@ -120,6 +120,7 @@ function history --description "display or manipulate interactive command histor
|
||||||
|
|
||||||
if test $search_mode = --exact
|
if test $search_mode = --exact
|
||||||
builtin history delete $search_mode $_flag_case_sensitive -- $searchterm
|
builtin history delete $search_mode $_flag_case_sensitive -- $searchterm
|
||||||
|
builtin history save
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue