Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
aliases not getting expanded inside functions?
- X-seq: zsh-users 5640
- From: Carlos Carvalho <carlos@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: aliases not getting expanded inside functions?
- Date: Fri, 3 Jan 2003 13:31:05 -0200
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi users,
First, thanks Bart for the info on the C preprocessor bug.
Now I'm trying to do something like
% alias -g foo='bar'
% escr() {print $foo}
I'd expect that since the alias is global, comes before the definition
of the function, and aliases are expanded when a function is read,
that the function would be in effect {print $bar}, but it isn't:
% which escr
escr () {
print $foo
}
The "problem" is with the $, because if I write {print foo} instead of
{print $foo} in the definition the function appears as {print bar}, as
I expected. Is this correct? If so, is there a way to achieve this
substitution? This is in a script, not interactive.
Thanks in advance.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author