Sort items by frecency (frequency + recency) #4543
                  
                    
                      lalvarezt
                    
                  
                
                  started this conversation in
                Show and tell
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Sorts fzf results based on your selection history, prioritizing items you return to often and those you touched most recently.
Note: Author has stated (#777, #1213) that they're not interested in adding this functionality, so I thought I'll give it a try.
How it works:
raw = log₂(frequency + 1) × 0.5^(age / 30d) × momentumUsage:
Inspired by: zoxide's frecency algorithm for directory jumping.
You can check it here (frecency branch)
https://github.com/lalvarezt/fzf/tree/frecency
Updates
2025-10-29
Tiebreak integration: Frecency now integrates via fzf's standard
--tiebreakmechanism instead of being prepended to criteria.frecencyandscoreas explicit tiebreak criteria--tiebreak,byScoreis not auto-prepended (allows frecency-first sorting)--frecencyflag remains as backward-compatible shorthand for--tiebreak=frecency,score,lengthFlexible criterion ordering: Users can now position frecency anywhere in the sort order:
Frecency scoring: Simplify frecency scaling and optimize for realistic frequency ranges
Score distribution across realistic usage patterns:
2025-10-27
2025-10-15
--frecency-debugto surface raw, decay, momentum, and scaled columns.2025-10-10
Added new actions to manage the frecency database
It can be used like so:
Beta Was this translation helpful? Give feedback.
All reactions