Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

'i' subscript flag



Hi,

man zshparam says: 
"i   Like ‘r’, but gives the index of the match instead; this may not
be combined with a second argument."

I just wonder why this can't be combined with another flag which would
be useful in this case for example:

Saito% X="bar foo paz"
Saito% print $X[(i)p*]
9
Saito% print $X[(wi)p*]
9

but one may expect to get '3'. Is this a design choice?

-- 
Anthony CHARLES



Messages sorted by: Reverse Date, Date, Thread, Author