Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: nested parameter expansion
- X-seq: zsh-users 26081
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: nested parameter expansion
- Date: Thu, 24 Sep 2020 10:29:15 +0200
- Archived-at: <https://zsh.org/users/26081>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-09/CAN%3D4vMrSbpz3ZkU3KP%2BbmYuko5%2B8yWcKEj7HTPHE2FqH7ou76w%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-il1-f176.google.com) smtp.remote-ip=209.85.166.176; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=oYKD89/IKZ5EZK+awcfFu06ge3ExcNM9fkYj84uwY3c=; b=PJiMVg1pCli0ZgwNfLqlFYRefFr+LBfgmpoYAHy6p0YmEPHRK0buR/Q5x7vE+2SHtw lDBc+jjxOHibA4LaGq92PzLBUCWzehvlvbrLGSbh7NY6FwjLVGVCpNGq5ItQheFJ7RLI iAs0B+pcQTp3/DbqBqJfg1tSzuHMY4Md6x9tl+Dd2rrdv965XKawHKYK+1BTz9vvs6Ka yygB73Q2PNn0HC1sMoQYyU4Y6nKmRJtzX7JYAR3ediKOYoqvceXZvvjPrYs1eDmVhUsx B1YWaEi9gP4CBzt2uOlUUv4VlZ4D4MuMZA5tbuQ3L+Hs45cXa8tZhoqKuTROmgpasNt3 Vlgg==
- In-reply-to: <1356305032.19895.1600935325161@mail2.virginmedia.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- References: <20200924010311.7083@binki> <1356305032.19895.1600935325161@mail2.virginmedia.com>
- Sender: zsh-users-request@xxxxxxx
On Thu, Sep 24, 2020 at 10:15 AM Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author