Closed prplwtf closed 3 months ago
Alright should be sorta fixed now. Some of the math operators won't be highlighted, but I'm afraid there's not much that can be done about it.
check="$((xcode-\select --install) 2>&1)"
This ^ is valid but isn't arithmetic. And the parsing engine isn't smart enough to be able to "look ahead" and see if something ends with "))" or ends with ") 2>&1 )". We have to guess at the begining whether its arithmetic or not. And because there's an insane number of hacks going on just to match the name of a command (vs arguments), there isn't a great way to just add math operators to $()
when inside of an if statement.
I might be able to add a hack in the future to improve the situation a bit, but for now v1.8.0 fixes the cascading breakage by assuming non-arithmetic.
Aright, thanks for fixing it.
The code with a problem is:
https://github.com/BlueprintFramework/main/blob/da8b8001c4414c56fca9fcee46cb78dd2c36b41f/blueprint.sh#L323
It looks like:
All commands below this IF statement have incorrect syntax highlighting.
It should look like:
Screenshot without the "Better Shell Syntax" VSCode extension enabled.