Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bad expansion
- X-seq: zsh-workers 16475
- From: DervishD <raul@xxxxxxxxxxxx>
- To: raul@xxxxxxxxxxxx, zefram@xxxxxxxx
- Subject: Re: Bad expansion
- Date: Mon, 21 Jan 2002 20:40:43 +0100
- Cc: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Reply-to: DervishD <raul@xxxxxxxxxxxx>
- Sender: DervishD <raul@xxxxxxxxxxxx>
Hello Zefram :))
>> # Bad substitution
>> echo ${${testing[1]}_VALUE}
>echo ${(e):-\$${testing[1]}_VALUE}
>The :-\ is a smiley that means "maybe there ought to be a neater way".
Are you joking? XDD It works, but, AFAIK, this (apart from the
obvious smiley) means:
"Expand <NULL> identifier, and, if it is not defined or missing
(which is true), expand the other thing, that is, \$${testing[1]}_VALUE"
But, why? I mean, maybe there ought to be a neater way ;)))
Really, I'm not an expert about parameter expansion. Just the
simple fact that you have provided me a solution is magic for me.
Thanks a lot Zefram :)) And nice smile-like solution ;)))))
Raúl
Messages sorted by:
Reverse Date,
Date,
Thread,
Author