better-shell-syntax
better-shell-syntax copied to clipboard
Parameter substitutions in general are coloured incorrectly
The code with a problem is:
echo "${1:-Nothing}"
It looks like:
It should look like:
The Nothing is a string and should be brown.
This is misleading to someone just learning about parameter substitutions, because it makes it look like Nothing will be subbed as a variable, when it's actually a string.
This code:
printf %s\\n "${1-$(date -u +'%-H:%M on %-d %B %+4Y')}"
prints either the first argument or the current time and date, and works correctly, but isn't highlighted correctly.
bruh