[Pkg-zsh-devel] Bug#842994: Bug#842994: Bug#842994: zsh-syntax-highlighting: shell flooded with error messages

Daniel Shahaf danielsh at apache.org
Thu Nov 3 13:23:27 UTC 2016


Control: severity -1 normal
Control: forwarded -1 https://github.com/zsh-users/zsh-syntax-highlighting/issues/252

raphael truc wrote on Thu, Nov 03, 2016 at 10:27:35 +0100:
> Indeed, I noticed I had aliased long time ago ! to sudo (which I forgot)

This is an artifact of using `source zsh-syntax-highlighting.zsh` to
load zsh-syntax-highlighting; using `autoload -U` would avoid aliases
in the calling scope being applied.  There already is an upstream issue
for that: https://github.com/zsh-users/zsh-syntax-highlighting/issues/252

Given that your alias changes the meaning of a shell syntax construct,
it would break _any_ plugin that's run by `source` [which is most of
them], not just z-sy-h.  Hence I'm demoting the severity.

I'm afraid the upstream fix is not entirely trivial, it is not scheduled
yet.  In the meantime, the workarounds available to you are either to
move the «!» inside the parentheses, or to define the alias _after_
loading z-sy-h.

Cheers,

Daniel



More information about the Pkg-zsh-devel mailing list