'main': Highlight command substitutions inside double quotes.

Part of issue #139.
This commit is contained in:
Daniel Shahaf
2016-09-25 14:31:31 +00:00
parent 4fc35362ee
commit c3913e0d8e
2 changed files with 40 additions and 0 deletions

View File

@@ -756,6 +756,8 @@ _zsh_highlight_main_highlighter_highlight_string()
elif [[ ${arg:$i} =~ ^[{]([A-Za-z_][A-Za-z0-9_]*|[0-9]+)[}] ]] ; then
(( k += $#MATCH )) # highlight the parameter name and braces
(( i += $#MATCH )) # skip past it
elif [[ $arg[i+1] == $'\x28' ]]; then
# Highlight just the '$'.
else
continue
fi