From: Sebastian Gniazdowski <psprint@zdharma.org>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] Forcing array interpretation in parameter substitution
Date: Thu, 13 Apr 2017 18:29:24 +0200 [thread overview]
Message-ID: <etPan.58efa764.3d1b58ba.15fbc@MacMini.local> (raw)
Just realized that this isn't a "5.0.2" or so thing. Great commit really, it allows to index (z) result, or (s::) result, when there is no split and instead of array, a string is returned:
>: var="abc"; echo ${${(z)var}[1]}; echo ${${(Az)var}[1]} "<- so (A) does help"
a
abc <- so (A) does help
I wonder if there can be any workaround for older versions, tried (@z) or silly (0z) etc., and no make-array effect occurs.
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
next reply other threads:[~2017-04-13 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 16:29 Sebastian Gniazdowski [this message]
2017-04-13 21:03 ` Bart Schaefer
-- strict thread matches above, loose matches on Subject: below --
2017-02-25 22:47 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=etPan.58efa764.3d1b58ba.15fbc@MacMini.local \
--to=psprint@zdharma.org \
--cc=zsh-workers@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).