Closed dnicolson closed 2 years ago
nice catch!
currently after the here string operator we only recognize either rather simple strings or barewords so i expect the grammar to also fail for sufficiently complicated variable substitutions.
it might make more sense to drop those rules altogether, i.e. recognize the <<<
but let the regular shell grammar take back over immediately after, since we can't reliably detect where the actual here string ends :thinking:
my availability is kind of limited right now, would you consider submitting a pr?
for completeness' sake i should point out that here strings with command substitutions don't make a lot of semantic sense since foo <<<$(bar)
is equivalent to bar | foo
, and that you should generally quote command substitutions (although bash doesn't seem to apply word splitting here :shrug:), but that's not what this issue is about :vulcan_salute:
I guess I could try a bit later, I don't have experience with .tmLanguage
files so it's not immediately obvious to me where to make the changes.
i found some time to do it, could you check if cd4cf53 works for you?
It works, thanks for the quick fix!
Here strings (
<<<
) when used with command substitution cause two issues:)
) is a different color to the opening one`
) results in improper syntax highlighting on the lines below