zsh-workers
 help / color / mirror / code / Atom feed
* bad error message "defining function based on alias"
@ 2023-01-16 16:38 Vincent Lefevre
  2023-01-16 17:45 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Lefevre @ 2023-01-16 16:38 UTC (permalink / raw)
  To: zsh-workers

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@vinc17.net> - 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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-16 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16 16:38 bad error message "defining function based on alias" Vincent Lefevre
2023-01-16 17:45 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).