Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
bad error message "defining function based on alias"
- X-seq: zsh-workers 51305
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: bad error message "defining function based on alias"
- Date: Mon, 16 Jan 2023 17:38:29 +0100
- Archived-at: <https://zsh.org/workers/51305>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
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