zsh-users/zsh-syntax-highlighting

$READNULLCMD / $NULLCMD are red

Open

#716 ouverte le 23 mars 2020

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)Shell (1 371 forks)batch import
BugTaskgood first issuesyntax:command-word

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 '$NULLCMD | $READNULLCMD' main nullcmd 'local NULLCMD=cat READNULLCMD=f; f(){};' 
Set copyright year to 2020? y
local NULLCMD=cat READNULLCMD=f; f(){};

BUFFER=$'$NULLCMD | $READNULLCMD'

expected_region_highlight=(
  '1 8 unknown-token' # $NULLCMD
  '10 10 commandseparator' # |
  '12 23 unknown-token' # $READNULLCMD
)

That's likely because they're special, and as such don't get expanded (which makes this another case of #695):

% p ${(t)READNULLCMD} ${(t)NULLCMD}
scalar-special scalar-special

Guide contributeur