*-highlight: Simple temporary but good solution to $(...) at command pos

This commit is contained in:
Sebastian Gniazdowski 2018-08-23 17:00:48 +02:00
parent fc2fc8e4b1
commit 7641549541

View file

@ -680,17 +680,19 @@ typeset -ga ZLAST_COMMANDS
# anonymous function
__style=${FAST_THEME_NAME}reserved-word
elif [[ $__arg == $'\x28' ]]; then
# subshell (, stack: letter 'R'
# subshell '(', stack: letter 'R'
__style=${FAST_THEME_NAME}reserved-word
braces_stack='R'$braces_stack
elif [[ $__arg == $'\x29' ]]; then
# ), stack: letter 'R' for subshell
# ')', stack: letter 'R' for subshell
[[ $braces_stack = R* ]] && { braces_stack=${braces_stack#R}; __style=${FAST_THEME_NAME}reserved-word; }
elif (( this_word & 14 )); then
__style=${FAST_THEME_NAME}default
elif [[ $__arg = (';;'|';&'|';|') ]] && (( this_word & BIT_case_code )); then
(( next_word = (next_word | BIT_case_item) & ~(BIT_case_code+3) ))
__style=${FAST_THEME_NAME}default
elif [[ $__arg = \$\([^\(]* ]]; then
already_added=1
fi
;;
*)