*highlight: Better highlighting of in-string variables

This commit is contained in:
Sebastian Gniazdowski 2017-03-25 15:15:17 +01:00
parent 026b888ad2
commit c05d35e0a0

View file

@ -628,7 +628,7 @@ __HSMW_HIGHLIGHT_TOKENS_TYPES=(
mybuf="$arg" mybuf="$arg"
idx=start_pos idx=start_pos
while [[ "$mybuf" = (#b)[^\$\\]#((\$[a-zA-Z0-9_:]##(\[[^\]]#\])(#c0,1))|(\$[{](\([a-zA-Z0@%#]##\))(#c0,1)[a-zA-Z0-9_:#]##(\[[^\]]#\])(#c0,1)[}])|[\\][\'\"\$]|[\\](*))(*) ]]; do while [[ "$mybuf" = (#b)[^\$\\]#((\$(#B)([a-zA-Z_:][a-zA-Z0-9_:]##|[0-9]##)(#b)(\[[^\]]#\])(#c0,1))|(\$[{](\([a-zA-Z0@%#]##\))(#c0,1)[a-zA-Z0-9_:#]##(\[[^\]]#\])(#c0,1)[}])|[\\][\'\"\$]|[\\](*))(*) ]]; do
[[ -n "${match[7]}" ]] && { [[ -n "${match[7]}" ]] && {
# Skip following char it is quoted. Choice is # Skip following char it is quoted. Choice is
# made to not highlight such quoting # made to not highlight such quoting