From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh users <zsh-users@sunsite.dk>
Subject: Re: Build a variable name from another variable?
Date: Sat, 24 Jan 2004 02:36:45 +0000 [thread overview]
Message-ID: <1040124023645.ZM19075@candle.brasslantern.com> (raw)
In-Reply-To: <20040124005150.GA14079@descolada.dartmouth.edu>
On Jan 23, 7:51pm, Omen Wild wrote:
}
} Quoting Philippe Troin <phil@fifi.org> on Fri, Jan 23 15:19:
} >
} > % t="${baz}contents"
} > % echo ${${(P)t}}
} > bar contents
} >
} > Works...
} > i could not manage to do it without an intermediate variable.
}
} Ah, this will probably work for me.
Here it is without the intermediate variable:
${(P)${:-${baz}contents}}
next prev parent reply other threads:[~2004-01-24 2:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-23 22:42 Omen Wild
2004-01-23 23:19 ` Philippe Troin
2004-01-24 0:51 ` Omen Wild
2004-01-24 2:36 ` Bart Schaefer [this message]
2004-01-23 23:47 ` Cosmo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1040124023645.ZM19075@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).