zsh-users/zsh-syntax-highlighting

Block with assignment with no command

Open

#854 aberto em 31 de jan. de 2022

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)Shell (1.371 forks)batch import
Buggood first issue

Métricas do repositório

Stars
 (22.617 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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.

Guia do colaborador