From 24aa777af63e98e9f55cba8bf6ce66fb2937e013 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 25 Oct 2016 20:56:52 +0200 Subject: [PATCH] *highlight: Format `if` in one line (the ${(P)MATCH} *-type code) --- hsmw-highlight | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hsmw-highlight b/hsmw-highlight index b6c56ed..7a2236a 100644 --- a/hsmw-highlight +++ b/hsmw-highlight @@ -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}}