Open akim-13 opened 2 years ago
The plugin doesn't support the feature exactly as you've described it, but would setting ZSH_AUTOSUGGEST_HISTORY_IGNORE
possibly work for you? It would allow you to suppress history suggestions for certain prefixes like cd
.
See the section of the readme here: https://github.com/zsh-users/zsh-autosuggestions#ignoring-history-suggestions-that-match-a-pattern
Is your feature request related to a problem? Please describe.
It doesn't make sense to use the same suggestion strategy for e.g.
man
andcd
. If you typecd <TAB>
in home it might suggest some sub directory which you cannot currentlycd
into. Same forman <TAB>
, it will suggest some rubbish instead of the last searched man page.Describe the solution you'd like
Allow to define command-specific
ZSH_AUTOSUGGEST_STRATEGY
arrays. This way it would be possible to haveZSH_AUTOSUGGEST_STRATEGY=(
completion
history)
forcd
, andZSH_AUTOSUGGEST_STRATEGY=(
history
completion)
forman
.Describe alternatives you've considered
Maybe it's already an existing functionality, I just couldn't find it.