zsh-users/zsh-syntax-highlighting

Jobs in command position

Aperta

#874 aperta il 27 mag 2022

 (2 commenti) (0 reazioni) (0 assegnatari)Shell (1371 fork)batch import
Buggood first issuesyntax:command-word

Metriche repository

Star
 (22.617 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

The various percent syntaxes for referring to a job (https://zsh.sourceforge.io/Doc/Release/Jobs-_0026-Signals.html#Jobs) can be used in command position to foreground that job:

% cat & 
[1] 9896
% 
[1]  + suspended (tty input)  cat
% %cat
[1]  + continued  cat

In the example, %cat should be green, even if there's no alias/function/builtin of that name.

Cf. https://zsh.org/users/27806 (user ran into this in zsh upstream).

Guida contributor