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

Broken by zsh-autocomplete on Zsh 5.9 #751

Open
ccostello97 opened this issue Jul 16, 2023 · 3 comments
Open

Broken by zsh-autocomplete on Zsh 5.9 #751

ccostello97 opened this issue Jul 16, 2023 · 3 comments

Comments

@ccostello97
Copy link

ccostello97 commented Jul 16, 2023

I originally had posted this as an issue on marlonrichert/zsh-autocomplete but it was pointed out that this would be better classified as an issue in zsh-autosuggestions.

If you have zsh-autosuggestions and set ZSH_AUTOSUGGEST_STRATEGY=(history completion), autosuggest will first try to find a suggestion from your history, but, if it can't find a match, will find a suggestion from the completion engine.

With zsh-autocomplete installed, autosuggest will still show history suggestions, but ignore completion suggestions.

Expected behavior is that zsh-autosuggestions would continue to respect configuration set by ZSH_AUTOSUGGEST_STRATEGY.

System:

M1 Mac
macOS Ventura 13.4.1
zsh 5.9

Working for history:
248826225-dc98c6e3-1b63-4aec-8529-e3ad3f475a85

Not working for completion which is not in history:
248826350-0a622076-0e18-484b-9870-22d8b8e235e0

I have another laptop with the same specs and same exact Zsh configurations running 5.8 where both plugins work in tandem, which makes me think this is related to changes to completions engine between Zsh versions.

@ccostello97
Copy link
Author

Upgraded my second mac, which had been running 5.8, and it had been working, to 5.9, and can confirm Zsh version is integral in this not working

@Sirix1995
Copy link

Looks like it's broken on my Mageia 8 too. It's enabled on Oh-my-zsh, but when I type something, nothing happens. It's completely inactive.

@beatreichenbach
Copy link

beatreichenbach commented Oct 22, 2023

As a workaround add autoload -Uz compinit && compinit into .zshrc and completions work again.

edit: Unfortunately I don't know much about zsh and the build process to contribute a merge request but if someone knows more, here's what I inserted before here:

# Mark for auto-loading the functions that we use

# Initialize completion for the current session
if (( ${+ZSH_AUTOSUGGEST_STRATEGY[(ie)completion]} )); then
	autoload -Uz compinit && compinit
fi

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

No branches or pull requests

4 participants