Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
${(kv)foo[bar]}
- X-seq: zsh-workers 21084
- From: Andrey Borzenkov <arvidjaar@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: ${(kv)foo[bar]}
- Date: Sun, 3 Apr 2005 14:35:12 +0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
-----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-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author