Evals need escaping #152
Working on adding the q flags. Seems to fix the errors associated with opp.zsh.
I'm curious... What was the reason behind the change from
${${widgets[$cur_widget]#*:}/:/ }
to
${${(s.:.)widgets[$cur_widget]}[2,3]}
in zsh-users/zsh-syntax-highlighting@11d3783 and zsh-users/zsh-syntax-highlighting@cb02451?
danielshahaf
commented
Apr 23, 2016
Forward compatibility in case more colon-separated fields are added at the end in the future.
But you should review the combined diff 4849ef3..cb02451; most of the interim commits were stupid mistakes and their corrections.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/zsh-users/zsh-autosuggestions/blob/87facd9b85630f288433aa0a20a963cffc612ee5/zsh-autosuggestions.zsh#L134 needs to escape
$widgetas${(q)widget}because the value$widgetmight be shell-unsafe. (E.g., the plugin "opp.zsh" creates widgets with literal(in their names, according to a bug report (issue 278) I received over at z-sy-h, which would cause the eval to report a syntax error.)