*highlight: Format if in one line (the ${(P)MATCH} *-type code)

This commit is contained in:
Sebastian Gniazdowski 2016-10-25 20:56:52 +02:00
parent 002e127eb2
commit 24aa777af6

View file

@ -396,9 +396,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
# word, the parameter expansion will be highlighted as a reserved word --- but that
# incorrectness is outweighed by the usability improvement of permitting the use of
# parameters that refer to commands, functions, and builtins.
if [[ ${arg[1]} == \$ ]] && (( ${+parameters} )) && [[ ${arg:1} = (#m)([a-zA-Z_][a-zA-Z0-9_]#|[0-9]##) ]] &&
(( ${+parameters[${MATCH}]} ))
then
if [[ ${arg[1]} == \$ ]] && (( ${+parameters} )) && [[ ${arg:1} = (#m)([a-zA-Z_][a-zA-Z0-9_]#|[0-9]##) ]] && (( ${+parameters[${MATCH}]} )); then
-hsmw-highlight-main-type ${(P)MATCH}
else
: ${expanded_path::=${(Q)~arg}}