Skip to content
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

Feature request: sort matches by stats/‘frecency’ #2631

Open
khaeru opened this issue Mar 14, 2025 · 0 comments
Open

Feature request: sort matches by stats/‘frecency’ #2631

khaeru opened this issue Mar 14, 2025 · 0 comments

Comments

@khaeru
Copy link

khaeru commented Mar 14, 2025

Prior to finding Atuin, I started using zoxide as a replacement for cd.

One nice feature of zoxide that AFAICT¹ is not yet in Atuin is to sort results by incorporating usage stats. Zoxide uses the term ‘frecency’ (‘frequency’ + ‘recency’) for an algorithm that computes a score that incorporates (a) how many times a particular item has been accessed and (b) when the most recent access is.

To give an example, if I type gpf and then invoke the Atuin keybinding, I see something like:

  4 54ms   4d ago git restore --staged setup.cfg
  3 1s     3d ago git pull --ff
  2 2s    11m ago git push --force
  1 3ms    2d ago grep _dataflow message_ix_models/model/transport/data.py
  > 3ms    3d ago grep Dataflow message_ix_models/model/transport/files.py

In this case, I have run the last (>) command only once and not for several days. OTOH command 2 I have run (a) many times and (b) most recently. A ‘frecency’-like score would be higher for this item, making it automatically the current item/selectable by immediately pressing [Enter].

¹ I've read through the configuration docs page and searched there and in the forums, but have not found anything related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant