[fish] Merge history before searching (#3852)

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
This commit is contained in:
ismay 2024-06-12 06:56:20 +02:00 committed by GitHub
parent 7fc13c5cfd
commit 144d55a5be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -62,6 +62,11 @@ function fzf_key_bindings
set -l FISH_MAJOR (echo $version | cut -f1 -d.)
set -l FISH_MINOR (echo $version | cut -f2 -d.)
# merge history from other sessions before searching
if test -z "$fish_private_mode"
builtin history merge
end
# history's -z flag is needed for multi-line support.
# history's -z flag was added in fish 2.4.0, so don't use it for versions
# before 2.4.0.

View File

@ -66,7 +66,7 @@ class Shell
end
def fish
"unset #{UNSETS.join(' ')}; FZF_DEFAULT_OPTS=\"--no-scrollbar --pointer '>' --marker '>'\" fish_history= fish"
"unset #{UNSETS.join(' ')}; rm -f ~/.local/share/fish/fzf_test_history; FZF_DEFAULT_OPTS=\"--no-scrollbar --pointer '>' --marker '>'\" fish_history=fzf_test fish"
end
end
end