The highlighting in bash is broken, since I just updated to 3147
echo "foo"
echo "`dirname -- foo/bar`"
echo "bar"
Somehow the end of the string is not recognized and echo "bar" is colored incorrectly. It’s so hard to write shell scripts ATM… 
The highlighting in bash is broken, since I just updated to 3147
echo "foo"
echo "`dirname -- foo/bar`"
echo "bar"
Somehow the end of the string is not recognized and echo "bar" is colored incorrectly. It’s so hard to write shell scripts ATM… 
Could you post this as an issue here?
You could use
echo "$(dirname -- foo/bar)"
in the meantime.