zsh-workers
 help / color / mirror / code / Atom feed
* ${(kv)foo[bar]}
@ 2005-04-03 10:35 Andrey Borzenkov
  2005-04-03 17:49 ` ${(kv)foo[bar]} Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2005-04-03 10:35 UTC (permalink / raw)
  To: zsh-workers

-----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-----


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-03 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-03 10:35 ${(kv)foo[bar]} Andrey Borzenkov
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

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).