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

bad error message "defining function based on alias"



With zsh 5.9:

cventin% alias foo=true
cventin% foo() { }
zsh: defining function based on alias `foo'
zsh: parse error near `()'
cventin% alias bar=foo
cventin% bar() { }
zsh: defining function based on alias `foo'
zsh: parse error near `()'
cventin% unalias foo
cventin% bar() { }  
zsh: defining function based on alias `bar'
zsh: parse error near `()'

The second "zsh: defining function based on alias `foo'" should
really be "zsh: defining function based on alias `bar'".

And shouldn't one get only one (more accurate) error message?
The additional "parse error" is confusing.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




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