Thanks for the explanations I'll use autoload -U and remove the alias, which was not a good idea at the beginning Have a nice day
Raphael 2016-11-03 14:23 GMT+01:00 Daniel Shahaf <danie...@apache.org>: > 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 >