zsh-users/zsh-syntax-highlighting

Block with assignment with no command

Open

#854 建立於 2022年1月31日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)Shell (22,617 star) (1,371 fork)batch import
Buggood first issue

描述

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

貢獻者指南