zsh-users
 help / color / mirror / code / Atom feed
From: Phil Pennock <phil@psidev.net>
To: Zsh Users <zsh-users@sunsite.auc.dk>
Subject: expansion of nested parameters
Date: Mon, 22 Nov 1999 19:02:25 +0000	[thread overview]
Message-ID: <19991122190225.A8613@psidev.net> (raw)

Hiya, quick question:

Not on list these days, please CC me in on replies - thanks.

This is with zsh-3.0.7:
-----------------------------< cut here >-------------------------------
#!/bin/zsh -f
a=foo
wib_foo_ble=Wow
c=\$wib_${a}_ble
print ${(e)c}
print ${(e)\$wib_${a}_ble}
-----------------------------< cut here >-------------------------------

1: Why does the second print statement print out the current process ID
   from $$ instead of printing the same as the first print statement?

2: Is there a way to do this without using an intermediate variable, as
   I've done with $c and without using eval statements?

For now, since the job needs doing, I'm using an intermediate, but the
perfectionist in me wants to know what I was doing wrong?

Or is the answer really obvious, and it's my fault for not using zsh so
heavily these days?  :^)

Thanks folks,
-- 
--> Phil Pennock (!PP8185)


             reply	other threads:[~1999-11-22 19:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-22 19:02 Phil Pennock [this message]
1999-11-22 19:34 ` Zefram
1999-11-22 20:14 ` Bart Schaefer

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=19991122190225.A8613@psidev.net \
    --to=phil@psidev.net \
    --cc=zsh-users@sunsite.auc.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).