zsh-autosuggestions icon indicating copy to clipboard operation
zsh-autosuggestions copied to clipboard

Preferred suggestions order (`completion` mode)

Open HanabishiRecca opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

With lots of commands in the system you should type more symbols to narrow the autocompletion results. Sometimes suggestion can't help at all.

Describe the solution you'd like

Perfect: rank most used commands automatically and suggest em in the first place. OK: add an option, where you can list your preferred commands.

Describe alternatives you've considered

history mode can work this way, but also pollutes with a junk quickly.

Additional context

I think it may be good to get your favourite commands in the first place straight from the first symbol typed. For example, I always want to see sudo immediately after typing s, pacman after typing p, flatpak after typing f etc. Because there are so many similar commands, you end up typing almost the whole command before actually get the right suggestion.

HanabishiRecca avatar Aug 14 '22 14:08 HanabishiRecca

Kinda achieved it by using zsh builtin function, like:

builtin fc -R "${ZDOTDIR:-${HOME}}/.favcmds"

Then in .favcmds file add the favourite commands. Autosuggest config:

ZSH_AUTOSUGGEST_STRATEGY=(history completion)

HanabishiRecca avatar Sep 04 '22 13:09 HanabishiRecca