zsh-users/zsh-syntax-highlighting

Block with assignment with no command

Open

#854 geöffnet am 31. Jan. 2022

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Shell (1.371 Forks)batch import
Buggood first issue

Repository-Metriken

Stars
 (22.617 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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

Contributor Guide