[Pkg-zsh-devel] Bug#842994: zsh-syntax-highlighting: aliases from calling scope (.zshrc) are effective
Daniel Shahaf
danielsh at apache.org
Fri Nov 11 08:27:43 UTC 2016
Control: forwarded -1 https://github.com/zsh-users/zsh-syntax-highlighting/issues/390
Daniel Shahaf wrote on Thu, Nov 03, 2016 at 13:23:27 +0000:
> 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
>
> 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.
Come to think of it, there's a simpler solution: to use `alias -L` and
`unalias -m \*`. I've proposed that on a new upstream bug report.
More information about the Pkg-zsh-devel
mailing list