From: Andrey Borzenkov <arvidjaar@newmail.ru>
To: zsh-workers@sunsite.dk
Subject: ${(kv)foo[bar]}
Date: Sun, 3 Apr 2005 14:35:12 +0400 [thread overview]
Message-ID: <200504031435.19457.arvidjaar@newmail.ru> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I was under impression that
typeset -A foo
foo[bar]=baz
print ${(kv)foo[bar]}
should print "bar baz". Apparently it repsects only one flag in this case.
Having it working would be handy e.g. in _arguments callbacks that need to get
options from command line; e.g. (current _urpmi)
pkgs=( $(urpmq --list
${(k)opt_args[--media]} ${(v)opt_args[--media]}
${(k)opt_args[--searchmedia]} ${(v)opt_args[--searchmedia]}
2> /dev/null
)
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCT8bnR6LMutpd94wRAh8bAKC8nVCX7fMQkc6vDSJgq8McMYeyJwCeISWp
SwlkICW2j5idqVcAGoC54Gc=
=Gvn/
-----END PGP SIGNATURE-----
next reply other threads:[~2005-04-03 10:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-03 10:35 Andrey Borzenkov [this message]
2005-04-03 17:49 ` ${(kv)foo[bar]} Bart Schaefer
2005-04-03 18:00 ` ${(kv)foo[bar]} Andrey Borzenkov
2005-04-03 19:58 ` ${(kv)foo[bar]} 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=200504031435.19457.arvidjaar@newmail.ru \
--to=arvidjaar@newmail.ru \
--cc=zsh-workers@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).