-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Disable completions when line contains a comment #773
Comments
I'm currently using @bretello's workaround to disable auto-suggestions within comments, but it's not ideal. My ZSH_AUTOSUGGEST_STRATEGY=(history completion)
ZSH_AUTOSUGGEST_COMPLETION_IGNORE='*\#*'
ZSH_AUTOSUGGEST_HISTORY_IGNORE='*\#*' But now, if there is a Maybe this could be solved for |
Problem
When using
ZSH_AUTOSUGGEST_STRATEGY=(completion)
, starting a comment inline sometime results in extra completions being shown after the start of the comment (#
)In the following example,
-e
is proposed as autosuggestion after the comment (completion forcat
)Solution
A potential approach could be disabling completions whenever a comment is started. I've experimented with the following:
which works in basic scenarios, but I'm sure it would break down in some cases (e.g. a string containing
<space>#
, multi-line statements?)The text was updated successfully, but these errors were encountered: