sorin-ionescu / prezto

The configuration framework for Zsh
MIT License
13.98k stars 4.49k forks source link

history-substring-search: add fuzzy and unique #2048

Closed dllud closed 1 year ago

dllud commented 1 year ago

Adds 2 useful options available on the currently linked version (v1.0.2) of history-substring-search: fuzzy search and unique results (removes duplicates).

indrajitr commented 1 year ago

Nice!

jeffwidman commented 1 year ago

Would it be a better out-of-the-box user experience to enable fuzzy search by default?

Unique I'm 👍 on adding the option, not so sure about enabling by default...

dllud commented 1 year ago

Would it be a better out-of-the-box user experience to enable fuzzy search by default?

I don't think so. It drastically changes the results you get when using spaces. Currently users are expecting a search for ls - to return the previous ls commands where arguments were used. With fuzzy search enabled they would get that plus all commands where ls was followed by any directory that had a - in it's name.

indrajitr commented 1 year ago

I am applying them as-is. Minor tweaks to follow. Thank you @dllud for your patience!