kelleyma49 / PSFzf

A PowerShell wrapper around the fuzzy finder fzf
MIT License
752 stars 35 forks source link

Make sorting by relevance the default behavior #186

Closed ofzorzo closed 1 year ago

ofzorzo commented 1 year ago

Nowadays, the default method of sorting in fzf when pressing Ctrl+r is by relevance and not chronological order (c387689). If the user wishes to see the commands in chronological order they must either press Ctrl+r again or add --no-sort to FZF_CTRL_R_OPTS.

The function Invoke-FzfPsReadlineHandlerHistory() currently passes the -NoSort argument whenever it is called, thus making fzf always sort by chronological order, even if we add --sort to FZF_CTRL_R_OPTS. I propose this argument should be removed, letting the user decide, by adding or not --no-sort to FZF_CTRL_R_OPTS, how they wish to order their results and making PSFzf's default behavior equal to fzf's.

kelleyma49 commented 1 year ago

Thank you for the update!