Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with atuin and completion strategies #797

Open
sainttttt opened this issue Jul 18, 2024 · 1 comment
Open

Conflict with atuin and completion strategies #797

sainttttt opened this issue Jul 18, 2024 · 1 comment
Labels

Comments

@sainttttt
Copy link

sainttttt commented Jul 18, 2024

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!

@sainttttt sainttttt added the bug label Jul 18, 2024
@bpeetz
Copy link

bpeetz commented Oct 21, 2024

atuin injects itself when it notices, that you are using zsh-autosuggestions:
https://github.com/atuinsh/atuin/blob/5c29057e9ac8af4cb94edd0819057e2b2dd34557/crates/atuin/src/shell/atuin.zsh#L21

So I think that is intentional behavior of atuin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants