'main': Highlight several more special (non-alphabetic) parameters.

This commit is contained in:
Daniel Shahaf
2016-09-25 14:51:02 +00:00
parent 4afe670f7a
commit 44ef6e38e5
2 changed files with 50 additions and 0 deletions

View File

@@ -760,6 +760,10 @@ _zsh_highlight_main_highlighter_highlight_string()
# $$ - pid
(( k += 1 )) # highlight both dollar signs
(( i += 1 )) # don't consider the second one as introducing another parameter expansion
elif [[ $arg[i+1] == [-#*@?] ]]; then
# $#, $*, $@, $?, $- - like $$ above
(( k += 1 )) # highlight both dollar signs
(( i += 1 )) # don't consider the second one as introducing another parameter expansion
elif [[ $arg[i+1] == $'\x28' ]]; then
# Highlight just the '$'.
else