zsh-users/zsh-syntax-highlighting

Block with assignment with no command

Open

#854 aperta il 31 gen 2022

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Shell (1371 fork)batch import
Buggood first issue

Metriche repository

Star
 (22.617 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

% tests/generate.zsh '{ a=42 }' main block-assignment-no-command
Set copyright year to 2022? y
BUFFER=$'{ a=42 }'

expected_region_highlight=(
  '1 1 reserved-word' # {
  '3 6 assign' # a=42
  '5 6 default' # 42
  '8 8 unknown-token' # }
)

That's a valid command so the final } should be a reserved-word.

Guida contributor