Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in alias expansion
On Nov 16, 1:50am, Mikael Magnusson wrote:
} Subject: Re: Bug in alias expansion
}
} > In older versions of zsh it gagged in a different way:
} >
} > % alias -g foo='echo x)$(:'
} > % print $(foo)
} > zsh: parse error near `)'
} > zsh: parse error in command substitution
}
} This error is definitely what I would expect from the above command.
} It's expanded in the subshell
If this were a normal command alias, I'd agree with you, but this is
a global alias -- the parent shell should expand it wherever it is an
unquoted shell word in the original command line, before the subshell
is ever started.
The "workaround" I posted in 37122 behaves the way you're thinking,
but shouldn't be necessary.
I suppose there's an argument to be made that a word inside $(...) is
"quoted", but if so. the example I showed for "typeset frobozz[$(foo)]"
(where xyz is expanded before parse_subscript() is called) must be
wrong.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author