zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
31.55k stars 1.88k forks source link

Disable `ZSH_AUTOSUGGEST_STRATEGY: completion` when on external HDD #719

Open NightMachinery opened 1 year ago

NightMachinery commented 1 year ago

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

Using the completion strategy makes the shell access the filesystem, which is very slow on external HDDs. It would good to have an option to disable this only on external volumes.

Describe the solution you'd like

An option that accepts a regexp to disable the completion strategy.

Describe alternatives you've considered

I can potentially do this myself with shell hooks, but I don't know if setting ZSH_AUTOSUGGEST_STRATEGY there will take effect.

ericfreese commented 1 year ago

An option that accepts a regexp to disable the completion strategy.

Have you tried ZSH_AUTOSUGGEST_COMPLETION_IGNORE? https://github.com/zsh-users/zsh-autosuggestions#skipping-completion-suggestions-for-certain-cases