zsh-users
 help / color / mirror / code / Atom feed
* print entire array *with* subscript?
@ 2006-02-09 19:40 Jean-Rene David
  0 siblings, 0 replies; 5+ messages in thread
From: Jean-Rene David @ 2006-02-09 19:40 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <200602101756.59858.arvidjaar@mail.ru>]

end of thread, other threads:[~2006-02-11  5:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-09 19:40 print entire array *with* subscript? Jean-Rene David
     [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

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