The code with a problem is:
#!/bin/bash
# 1. Normal arithmetic works fine
count=$(( 1 + 1 ))
echo "Count is $count"
# 2. BUG: Binary left shift inside arithmetic expression breaks highlighting
# The parser might be interpreting '<<' as the start of a here-doc, rather than
# a left-shift causing everything following it to be colored as a string.
shift_val=$(( 1 << 4 ))
# 3. The rest of the file is then incorrectly color coded
echo "Shift value is $shift_val"
exit 0
It looks like:
It should look like:
Local grammar changes made to arrive at the above can be provided - though I can not guarantee they do not have additional side effects I have not tested.
The code with a problem is:
It looks like:
It should look like:
Local grammar changes made to arrive at the above can be provided - though I can not guarantee they do not have additional side effects I have not tested.