zsh-users/zsh-syntax-highlighting

Block with assignment with no command

Open

#854 ouverte le 31 janv. 2022

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)Shell (1 371 forks)batch import
Buggood first issue

Métriques du dépôt

Stars
 (22 617 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

% 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.

Guide contributeur