-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tiebreak end,length not working as expected #926
Comments
So that explains the result we see. As you can see, the effect Instead you can take one of the following strategies:
|
Hey thanks for your help!
When searching for You can use these commands to reproduce the behavior: echo -e "workspace/project\nworkspace" | fzf --tiebreak begin --nth -1,.. --delimiter / and echo -e "workspace/project\nworkspace" | fzf --tiebreak begin --nth -1,.. --with-nth=-1,.. --delimiter / |
Both has the exactly same # FIFO
echo -e "workspace/project\nworkspace" | fzf --tiebreak begin --nth -1,.. --delimiter / -fworkspace
echo -e "workspace\nworkspace/project" | fzf --tiebreak begin --nth -1,.. --delimiter / -fworkspace
# 'length' kicks in
echo -e "workspace/project\nworkspace" | fzf --tiebreak begin,length --nth -1,.. --delimiter / -fworkspace
echo -e "workspace\nworkspace/project" | fzf --tiebreak begin,length --nth -1,.. --delimiter / -fworkspace
The representation does influence the search result. If not, it would be very confusing (e.g. fzf returns matches that don't even seem to match the query, |
If both get the same begin score, does |
I hope I am not taking too much of your time. I really would like to understand how |
Okay, I think this should be properly addressed. Actually, I haven't really used/tested |
Okay, it's official that
There are cases where "global" decision makes more sense, for example, file paths, but there are also other cases where "local" decision makes more sense, such as tabular input. Anyway, I'll have to fix it in either way. |
Ok, thanks for investigating. 😄 |
Hey,
I'm trying to filter a file list with files that are located in nested directories. The filename is most relevant. However, some files are duplicated into sub directories, so I am usuallay interested in files with a short filename as a second criterion. So I have added
--tiebreak end,length
to my fzf call but I always get the longer filename as first result. Is that a bug? As a concrete example I have the following two filepaths:When filtering for
webview.py
I always getas first suggestion.
The text was updated successfully, but these errors were encountered: