Closed lxg208 closed 1 month ago
We haven't changed the ranking algorithm for a while. What you're seeing is the way fzf scores the matches; matching characters at special positions (e.g. word boundary) are given higher bonus score. It was designed to work well in many cases, but it can't read your mind.
--no-sort
to your $FZF_CTRL_R_OPTS
, so that sorting is disabled by default (enabled by CTRL-R)ycpD
, try starting your query with y
as the first character in the pattern gets the highest bonus point.
Checklist
man fzf
)Output of
fzf --version
0.52.1 (6432f00)
OS
Shell
Problem / Steps to reproduce
I tried this both on WSL and standalone Ubuntu. When I type CTRL-R, then "cpD" I got following:
498 ycpD 497 ls -c|perl -pe '/\D/' 494 code pD
The command I want is ycpD, I remember I used to get it as the last one, but things changed a couple of weeks ago and I'm getting above sequence. I think it's not version related, I'm having the issue with 0.42.0 and 0.52.1
I think there are two issues here: 1. ycpD is used the last, it should appear at the bottom, 2. cpD are togather in ycpD, but has less priority then other two cases
And here is my FZF_CTRL_R_OPTS --bind 'ctrl-s:clear-selection,ctrl-d:execute-silent(grep -vxFf {+f2..} ~/.bash_history > ~/.edh90868068; cp ~/.edh90868068 ~/.bash_history)'