Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
3.39k stars 96 forks source link

[Q] How to set the sort of all commands to most frequently used, not alphabetical? #423

Open kvenn opened 8 months ago

kvenn commented 8 months ago

Describe your question In my specific example, the most common thing following git checkout is main.

Or when using just with autocomplete, I'd like it to show the options sorted by the just command I run most regularly.

Is there a way to set sort to recently / most frequently used? As opposed to the default or alphabetical?

Thanks!

This was the most relevant issue I could find: https://github.com/Aloxaf/fzf-tab/issues/58 and https://github.com/skywind3000/z.lua/issues/99

YasserKa commented 2 months ago

Your problem can be solved by using a frecency tool, such as fre ^1, to track the entries you are interested in [^2]. Then you can populate the list using fre --sorted.

fzf-tab doesn't track this information for you.

[^2]: You can do that by setting a hook and parse the command