Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ShellScript] nested parentheses treated as arithmetic #4033

Open
keith-hall opened this issue Sep 4, 2024 · 0 comments · May be fixed by #4024
Open

[ShellScript] nested parentheses treated as arithmetic #4033

keith-hall opened this issue Sep 4, 2024 · 0 comments · May be fixed by #4024
Labels
C: Syntax T: bug A bug in an existing language feature

Comments

@keith-hall
Copy link
Collaborator

What happened?

Currently $(( is treated as arithmetic even when it isn't. Example Bash snippet which finds modified txt files but doesn't return an exit code if grep finds no matches:

TXT_FILES=$((git diff --name-only --diff-filter=ACMR main | grep \.txt) || true)
if [[ -z "$TXT_FILES" ]]; then
    echo 'no text files modified'
fi

Adding a space after $( and before ( fixes the highlighting but shouldn't be necessary.

deathaxe added a commit to deathaxe/sublime-packages that referenced this issue Sep 5, 2024
@deathaxe deathaxe added T: bug A bug in an existing language feature C: Syntax labels Sep 5, 2024
@deathaxe deathaxe linked a pull request Oct 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Syntax T: bug A bug in an existing language feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants