zsh-autosuggestions
zsh-autosuggestions copied to clipboard
Conflict with atuin and completion strategies
Like other users I've noticed that the completion strategy was never working, so I tried to do some debugging to see what was going on. I noticed that ZSH_AUTOSUGGEST_STRATEGY
variable was getting inserted with atuin
when being called in the _zsh_autosuggest_fetch_suggestion
function.
So here in strategies=(${=ZSH_AUTOSUGGEST_STRATEGY})
, It would print out as (atuin completion)
. Doing some more debugging I found out that somehow this gets injected right at _zsh_autosuggest_start
. Before this the variable seems fine.
So one fix I did was removing the first entry in the array with a slice, but also using another variable, like strategies=(${=ZSH_AUTOSUGGEST_STRATEGY_2})
and setting ZSH_AUTOSUGGEST_STRATEGY_2
in my zshrc also works. atuin
doesn't get injected into the other variable and it works fine. I have no idea how or why atuin
is getting injected into the variable and was hoping that you could possibly help me debug this further. As it stands, using the variable name change works and the completions now work as expected, but it would be nice to have a permanent fix.
Oh also in case you are not familiar, atuin is a shell plugin which gives you better command history and searching and is somewhat popular.
Please let me know if there is more information you need, Thanks!