jeff-hykin / better-shell-syntax

💾 📦 ♻️ An improvement to the shell syntax for VS Code
MIT License
52 stars 4 forks source link

syntax highlighting error in arithmetic expressions #104

Open alexr00 opened 4 weeks ago

alexr00 commented 4 weeks ago

The code with a problem is:

z=$((x + y))

x is yellow entity.name.command.shell

It looks like:

Image

Image

It should look like:

I would expect x and y to have the same scopes.

Originally from @mcandre in https://github.com/microsoft/vscode/issues/231217#issuecomment-2410800447

LeoH1310 commented 3 weeks ago

The following problem may be related to this. When using arithmetic shift operation, everything after it is highlighted as a string. Like this: z=$((x << y))

friendly-bits commented 21 hours ago

I can not reproduce the exact issue described by @LeoH1310 but I'm having a similar issue:

e=$(( (c) << 8 )) turns everything after it into a string.

The parentheses around c seem to break the highlighting.

image

But this is probably an unrelated bug to the one which the issue was opened about.