You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a nice fzf script to search through and install Arch Linux packages.
In it, I use --nth so I can see the repo but only search the actual package string.
However, I am unable to define any tiebreak algorithm that puts the best matches first.
Searching for docker will yield one of the aur packages,
regardless of the tiebreak options.
In my day-to-day usage I encounter basically this,
except that there's lots more irrelevant results.
Workarounds
search for ^docker$
reorder the input so community packages appear first (pretty brittle)
Neither of these is reliable and convenient.
I think the solution would be a --tiebreak=matchlength option, which only takes the length of the match rather than the whole line into account.
And, again, sorting perfect matches first (#2285)
The text was updated successfully, but these errors were encountered:
I assumed that --tiebreak=length would already take into account the substring we select with the --nth selector.
Wouldn't this be a possibility as well, to have the length tiebreak work on the --nth substring automatically, as I do not think there wouldn't really be a use-case where you want the total line length, instead of the matching line length.
Just encountered a similar issue again, as I use --tiebreak=index now to sort non-AUR packages always first.
But in this example, the perfect match "context" if very far behind, making me wonder why the algorithm resorted to a tiebreak here at all - you don't need a tiebreak to see that the first match is a lot worse, even with a very generic algorithm. Do we maybe have a regression here?
man fzf
)Info
Problem / Steps to reproduce
I have a nice fzf script to search through and install Arch Linux packages.
In it, I use
--nth
so I can see the repo but only search the actual package string.However, I am unable to define any tiebreak algorithm that puts the best matches first.
Suppose the following scenario:
Searching for
docker
will yield one of the aur packages,regardless of the tiebreak options.
In my day-to-day usage I encounter basically this,
except that there's lots more irrelevant results.
Workarounds
^docker$
Neither of these is reliable and convenient.
I think the solution would be a
--tiebreak=matchlength
option, which only takes the length of the match rather than the whole line into account.And, again, sorting perfect matches first (#2285)
The text was updated successfully, but these errors were encountered: