From: Jean-Rene David <jrdavid@magma.ca>
To: zsh-users@sunsite.dk
Subject: print entire array *with* subscript?
Date: Thu, 9 Feb 2006 14:40:41 -0500 [thread overview]
Message-ID: <20060209194041.GA15035@princo> (raw)
The (k) expansion flag for associative arrays
substitutes the keys of the array instead of the
values.
But when applied to a normal array, it does
nothing. I thought it would have printed the
values' indices. It seems like an intuitive thing
to do. I thought that's what was meant in the
documentation:
13.3.1 Parameter Expansion Flags
[...]
k
[...] Used with subscripts (including
ordinary arrays), force indices or keys to be
substituted even if the subscript form refers to
values. [...]
Either I misunderstand, or it's not doing what it
says. I lean towards the former. Can someone shed
light?
$ zsh --version
zsh 4.2.5 (i686-pc-linux-gnu)
--
JR
next reply other threads:[~2006-02-09 19:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-09 19:40 Jean-Rene David [this message]
[not found] <200602101756.59858.arvidjaar@mail.ru>
2006-02-10 17:50 ` Jean-Rene David
2006-02-10 18:03 ` Peter Stephenson
2006-02-11 4:15 ` Justin M Wozniak
2006-02-11 5:20 ` 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=20060209194041.GA15035@princo \
--to=jrdavid@magma.ca \
--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).