From: Jens Elkner <jel+zsh@cs.uni-magdeburg.de>
To: zsh-workers@zsh.org
Subject: Re: get keys of an associative array?
Date: Mon, 27 Mar 2017 00:06:28 +0200 [thread overview]
Message-ID: <20170326220628.GB13200@trex.cs.ovgu.de> (raw)
In-Reply-To: <CAH+w=7YSv3th7qD9WFxrXrfuuCSGarbHZswTGW13JSHiY-irCQ@mail.gmail.com>
On Sun, Mar 26, 2017 at 01:03:31PM -0700, Bart Schaefer wrote:
> On Mar 26, 2017 12:41 PM, "Peter Stephenson" <p.w.stephenson@ntlworld.com>
> wrote:
>
> You need "${(k)A[@]}" in ksh mode, but I'm not sure why the (@) flag
> doesn't do the trick.
>
> The @ flag only makes things that are already arrays remain arrays in
> contexts where they would otherwise be joined. In ksharrays context, ${A}
> is a scalar.
You mean man page section for the k flag needs enhancements? At least A
is explictly declared as an associative array, so I would expect, that
"${(k)A}" should work as well ...
Thanx,
jel.
--
Otto-von-Guericke University http://www.cs.uni-magdeburg.de/
Department of Computer Science Geb. 29 R 027, Universitaetsplatz 2
39106 Magdeburg, Germany Tel: +49 391 67 52768
next prev parent reply other threads:[~2017-03-26 22:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-26 19:18 Jens Elkner
2017-03-26 19:34 ` Peter Stephenson
2017-03-26 20:03 ` Bart Schaefer
2017-03-26 22:06 ` Jens Elkner [this message]
2017-03-27 8:36 ` Peter Stephenson
2017-03-26 21:55 ` Jens Elkner
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=20170326220628.GB13200@trex.cs.ovgu.de \
--to=jel+zsh@cs.uni-magdeburg.de \
--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).