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.
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:Adding a space after
$(
and before(
fixes the highlighting but shouldn't be necessary.