Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ${$^foo} weirdness
- X-seq: zsh-workers 5896
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: ${$^foo} weirdness
- Date: Tue, 23 Mar 1999 13:40:19 +0100 (MET)
- In-reply-to: "Andrej Borsenkow"'s message of Tue, 23 Mar 1999 15:23:42 +0300
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Andrej Borsenkow wrote:
> I stumbled on it when testing some other thing ...
>
> bor@itsrm2:/tools/src/zsh-3.1.5-pws-13%> foo=(a b)
> bor@itsrm2:/tools/src/zsh-3.1.5-pws-13%> bar=(x y)
> bor@itsrm2:/tools/src/zsh-3.1.5-pws-13%> print ${$^foo}{1,2}$bar
> 195811x 195812x y
> bor@itsrm2:/tools/src/zsh-3.1.5-pws-13%> print ${${^foo}}{1,2}$bar
> a b1x b2x y
What you don't think of is that `$$' gives the PID and what you don't
know is that for special parameter names such as `$' the rest is
ignored.
But the manual explicitly says that nested substitution works only for
`${...}' or `$(...)'.
With that the above is correct -- for certain values of `correct'.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author