mirror of
https://github.com/zdharma-continuum/fast-syntax-highlighting.git
synced 2026-09-10 07:16:18 -04:00
*-highlight: Simple temporary but good solution to $(...) at command pos
This commit is contained in:
parent
fc2fc8e4b1
commit
7641549541
|
|
@ -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
|
||||
;;
|
||||
*)
|
||||
|
|
|
|||
Loading…
Reference in a new issue