mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
'main': Don't highlight arithmetic expansions as command substitutions.
This is not perfect: we don't try to detect cases such as «$((ls); (ls))», which look like arithmetic expansions but are in fact command substitutions. Fixes part of #607. Introduces #704.
This commit is contained in:
parent
2e65bb6d7d
commit
d237a60c9b
5 changed files with 99 additions and 12 deletions
|
|
@ -33,14 +33,14 @@ BUFFER=$': $((ls); (ls))'
|
|||
expected_region_highlight=(
|
||||
'1 1 builtin' # :
|
||||
'3 15 default' # $((ls); (ls))
|
||||
'3 15 command-substitution-unquoted' # $((ls); (ls))
|
||||
'3 4 command-substitution-delimiter-unquoted' # $(
|
||||
'5 5 reserved-word' # (
|
||||
'6 7 command' # ls
|
||||
'8 8 reserved-word' # )
|
||||
'9 9 commandseparator' # ;
|
||||
'11 11 reserved-word' # (
|
||||
'12 13 command' # ls
|
||||
'14 14 reserved-word' # )
|
||||
'15 15 command-substitution-delimiter-unquoted' # )
|
||||
'3 15 command-substitution-unquoted "issue #704"' # $((ls); (ls))
|
||||
'3 4 command-substitution-delimiter-unquoted "issue #704"' # $(
|
||||
'5 5 reserved-word "issue #704"' # (
|
||||
'6 7 command "issue #704"' # ls
|
||||
'8 8 reserved-word "issue #704"' # )
|
||||
'9 9 commandseparator "issue #704"' # ;
|
||||
'11 11 reserved-word "issue #704"' # (
|
||||
'12 13 command "issue #704"' # ls
|
||||
'14 14 reserved-word "issue #704"' # )
|
||||
'15 15 command-substitution-delimiter-unquoted "issue #704"' # )
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue