Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: simple substitution?
- X-seq: zsh-users 14299
- From: Andrey Borzenkov <arvidjaar@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx, tartifola@xxxxxxxxx
- Subject: Re: simple substitution?
- Date: Wed, 12 Aug 2009 15:56:26 +0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=SeBANzb9iDFZA8FCHClaVQ2RoJc5rs7GDNsY9ZyT5Sk=; b=ee+ROTfTodyUJDd3ThImrbaWDk8lY3TZjnN9pYRbLmqWAhScpGVRw6SwodewaiMEUr pDqoA+sYZRE/Gj4/Rb9AP3ieWT6fhb6588k7nbKqNJrop7ddtuZgfu1oz/7Ly7aQ1JWi uKVQ2kel+112UEWCrOkoXqVjRHg5iqNNVvaVA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=CZLXY1ms+HREJLhszJ5ovqZD7GTjEc+9A9wbb+bCkWajofAAp3nL+oCX1i18PdRY7j Bo27pvkrNg3Ll9UOhKZ9JPZCe7tXD206KpemZ+d+6z+uQGaF39lx5X3TKmHROSXh2aRO byEcHXHKOPagf8K55SejBytnOcaStncqo4ZFk=
- In-reply-to: <20090812133916.6ab5adcf.tartifola@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20090812133916.6ab5adcf.tartifola@xxxxxxxxx>
On Wednesday 12 of August 2009 15:39:16 tartifola@xxxxxxxxx wrote:
> Hi,
> I'm trying to understand expansion end substitution and I'm lost in
> what should be a simple substitution. Here my example
>
> >foo=4
> >echo ${foo}
>
> 4
>
> >FO=fo
> >O=o
> >echo \${${FO}${O}}
>
> ${foo}
>
Try
echo ${(P)${:-${FO}${O}}}
Recursive expansion never was a simple thing :)
Attachment:
signature.asc
Description: This is a digitally signed message part.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author