zsh-users
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: nested parameter expansion
Date: Thu, 24 Sep 2020 10:29:15 +0200	[thread overview]
Message-ID: <CAN=4vMrSbpz3ZkU3KP+bmYuko5+8yWcKEj7HTPHE2FqH7ou76w@mail.gmail.com> (raw)
In-Reply-To: <1356305032.19895.1600935325161@mail2.virginmedia.com>

On Thu, Sep 24, 2020 at 10:15 AM Peter Stephenson
<p.w.stephenson@ntlworld.com> wrote:
>
> You could add some eval trickery, but I suspect it's not worth making it any
> more complicated.

This should work:

    print ${(P)${:-P${ndx}_ARRAY}}

I wouldn't recommend writing it this way. It's quite a bit more
cryptic than using an intermediate variable.

Roman.


  reply	other threads:[~2020-09-24  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24  8:03 jdh
2020-09-24  8:15 ` Peter Stephenson
2020-09-24  8:29   ` Roman Perepelitsa [this message]
2020-09-24 17:07   ` jdh

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='CAN=4vMrSbpz3ZkU3KP+bmYuko5+8yWcKEj7HTPHE2FqH7ou76w@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=zsh-users@zsh.org \
    /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).