I find that there is a global alias for zsh. so when I setalias -g L='| less'command L will be replaced with command | less.But it seems that it cannot work with stderr output when I setalias -g LL= ' 2>&1 | less'which I expected to behave like command 2>&1 | less when using command LL.How can I achieve this goal correctly?
In zsh how to set an alias for `less` to get stderr output?
zsh;alias
Try:alias -g LL='2>&1 | less'You had an space in alias assignment, causing the alias failed.