You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 for cat)
Solution
A potential approach could be disabling completions whenever a comment is started. I've experimented with the following:
export ZSH_AUTOSUGGEST_COMPLETION_IGNORE='* \#*'
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:
But now, if there is a # character in the command line that does not begin a comment, then I will no longer get suggestions.
Maybe this could be solved for # characters contained within strings using a sufficiently fancy glob pattern, but there are other cases too (e.g. arr=(1 2 3); echo "${#arr[@]}" && ...), so I think another solution might be necessary.
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: