mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-25 04:40:21 +00:00
*highlight: In-string paremeter indexing [...] allowed, highlighted
This commit is contained in:
parent
8c33857c56
commit
b4e3d994d4
1 changed files with 2 additions and 2 deletions
|
@ -686,10 +686,10 @@ typeset -gA HSMW_HIGHLIGHT_STYLES
|
||||||
case "$arg[$i]" in
|
case "$arg[$i]" in
|
||||||
'$' ) style=dollar-double-quoted-argument
|
'$' ) style=dollar-double-quoted-argument
|
||||||
# Look for an alphanumeric parameter name.
|
# Look for an alphanumeric parameter name.
|
||||||
if [[ ${arg:$i} = (#b)([[:alpha:]_][[:alnum:]_]#|[[:digit:]]##)* ]] ; then
|
if [[ ${arg:$i} = (#b)(([[:alpha:]_][[:alnum:]_]#|[[:digit:]]##)(\[[^[:space:]]#\])(#c0,1))* ]] ; then
|
||||||
(( k += ${#match[1]} )) # highlight the parameter name
|
(( k += ${#match[1]} )) # highlight the parameter name
|
||||||
(( i += ${#match[1]} )) # skip past it
|
(( i += ${#match[1]} )) # skip past it
|
||||||
elif [[ ${arg:$i} = (#b)([{](\([a-zA-Z0@%#]##\))(#c0,1)([[:alpha:]_][[:alnum:]_]#|[[:digit:]]##)[}])* ]] ; then
|
elif [[ ${arg:$i} = (#b)([{](\([a-zA-Z0@%#]##\))(#c0,1)([[:alpha:]_][[:alnum:]_]#|[[:digit:]]##)(\[[^[:space:]]#\])(#c0,1)[}])* ]] ; then
|
||||||
(( k += ${#match[1]} )) # highlight the parameter name and braces
|
(( k += ${#match[1]} )) # highlight the parameter name and braces
|
||||||
(( i += ${#match[1]} )) # skip past it
|
(( i += ${#match[1]} )) # skip past it
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue