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

Re: Problem with user function





On 2024-02-23 11:40, Roman Perepelitsa wrote:

% alias X='echo howdy'; Y() { X }
zsh: defining function based on alias `Y'
zsh: parse error near `()'
Can you reproduce this by running the command within `zsh -f`? Recall
that `zsh -f` gives you a blank state: zsh with no rc files sourced.
No error:

0 /aRay 0 % zsh -f
b6-12-Deb11b#  alias X='echo howdy'; Y () { X }
b6-12-Deb11b#

... nuts, I wonder if I've presumed a 'rule' that isn't a rule at all, just some artifact of my configuration?  I'm in the mood to let sleeping dogs lie, but still ...
 
And then there's this and I probably don't want to know:

0 /aRay 0 % zsh -f
b6-12-Deb11b#  alias X='echo howdy'; Y () { X }
b6-12-Deb11b# Y
(EE)
Fatal server error:
(EE) Server is already active for display 0
    If this server is no longer running, remove /tmp/.X0-lock
    and start again.
(EE)
(EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.
(EE)
b6-12-Deb11b#

... I don't want to know.  It is not given to morals to understand what X does. 




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