Skip to content

Commit

Permalink
[Search History][Search Git Log] use history scoring scheme (#302)
Browse files Browse the repository at this point in the history
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 junegunn/fzf#3387.
  • Loading branch information
t-nil authored Aug 14, 2023
1 parent 883b78c commit 6d00ecc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions/_fzf_search_git_log.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
2 changes: 1 addition & 1 deletion functions/_fzf_search_history.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 6d00ecc

Please sign in to comment.