Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Allow '=' aliases to be used with -L



2018-03-21 15:19:05 -1000, Joey Pabalinas:
> Special case '=' aliases so that they can be output correctly
> by -L and be used in startup scripts.
[...]

FWIW, another corner case:

$ aliases[(e)]=whatever
$ alias -L
alias ''=whatever
$ eval "$(alias -L)"
zsh: whatever not found

Actually, I didn't quite expect that error message, I would have thought

echo ''=foo

would be the same as

echo '=foo'

That the = operator would not be recognised in that  context.

I can't say I like that behaviour. It gets worse with expansions:

$ echo $0=ls
/bin/zsh=ls
$ echo $1=ls
/bin/ls

-- 
Stephane



Messages sorted by: Reverse Date, Date, Thread, Author