From 6d00ecc6e5b2b1313cfcb25515941ecfd5342b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Mei=C3=9Fner?= <936176+t-nil@users.noreply.github.com> Date: Mon, 14 Aug 2023 20:23:33 +0200 Subject: [PATCH] [Search History][Search Git Log] use history scoring scheme (#302) Use the history scoring scheme for Search History and Search Git Log, which is overall better for ranking previously run commands and git log that than the default scheme per the discussion in https://github.com/junegunn/fzf/issues/3387. --- functions/_fzf_search_git_log.fish | 2 +- functions/_fzf_search_history.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/_fzf_search_git_log.fish b/functions/_fzf_search_git_log.fish index 2f0a521..f5de078 100644 --- a/functions/_fzf_search_git_log.fish +++ b/functions/_fzf_search_git_log.fish @@ -10,7 +10,7 @@ function _fzf_search_git_log --description "Search the output of git log and pre git log --no-show-signature --color=always --format=format:$fzf_git_log_format --date=short | \ _fzf_wrapper --ansi \ --multi \ - --tiebreak=index \ + --scheme=history \ --prompt="Search Git Log> " \ --preview='git show --color=always --stat --patch {1}' \ --query=(commandline --current-token) \ diff --git a/functions/_fzf_search_history.fish b/functions/_fzf_search_history.fish index 4b8e3c8..8b9adfd 100644 --- a/functions/_fzf_search_history.fish +++ b/functions/_fzf_search_history.fish @@ -16,7 +16,7 @@ function _fzf_search_history --description "Search command history. Replace the _fzf_wrapper --read0 \ --print0 \ --multi \ - --tiebreak=index \ + --scheme=history \ --prompt="Search History> " \ --query=(commandline) \ --preview="echo -- {} | string replace --regex '^.*? │ ' '' | fish_indent --ansi" \