Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
'i' subscript flag
- X-seq: zsh-users 12752
- From: Anthony Charles <antho.charles@xxxxxxxxx>
- To: zsh-users ml <zsh-users@xxxxxxxxxx>
- Subject: 'i' subscript flag
- Date: Wed, 2 Apr 2008 17:37:42 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject:message-id:mime-version:content-type:content-disposition:content-transfer-encoding:user-agent; bh=WrrmQiuKEXLn2SNA4U0feuu4zySAZVz90xSqOrpQsDU=; b=qna5e6rTngThlsBXMN0Qeg10Kz4h3hdYk0sp53QK/y346nPMCktiwLI3dgBeF/T91HRf5fkwyR7kpigL8fyTPN+GrgqRhn8QlH7G3xysjqrdLJloiYl/lRSWAvdy1XqVResh7Jo9WDoCroSDMIee8pEtJOBIoxxQHLYvWErObQk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type:content-disposition:content-transfer-encoding:user-agent; b=hqKq+PSSv/PfVnXIg4JAix984CzOC00sVnBjIalcY1togzxWEMs4WKD4WhhU3zCXwpkLCiZQBEIJbPg0BvDxBii/gAORusi3xQBbkiGvqPydhL+gndvNQs0xcbzLR0nfrbdAD3/MydOpwuLaHUFIEnJsnVOJ9nYGAqQdXB85OSo=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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