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

RE: strange alias effects



>
> Well, aliases are not expanded in direct function defiition
> (correct me,
> Bart). Weirdly enough, they are expanded (by default) in autoloaded
> functions.
>


Sorry, this is of course wrong. You just seem to have alias definition
*after* function definition. Because aliases are expanded when function
is *defined*, they are not seen when functnio is executed.

Autoloading provides neat workaround - function body is first read in
after everything else  (including aliases) was already defined. For the
same reason, second function definition in your example (on command
line) works as expected - aliases are already known.

-andrej



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