Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 'i' subscript flag
- X-seq: zsh-users 12758
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users ml <zsh-users@xxxxxxxxxx>
- Subject: Re: 'i' subscript flag
- Date: Wed, 02 Apr 2008 19:30:11 -0700
- In-reply-to: <200804021653.m32Grva2023100@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20080402153742.GA13167@okita> <080402094106.ZM652@xxxxxxxxxxxxxxxxxxxxxx> <200804021653.m32Grva2023100@xxxxxxxxxxxxxx>
On Apr 2, 5:53pm, Peter Stephenson wrote:
} Subject: Re: 'i' subscript flag
}
} Bart Schaefer wrote:
} > In some sense, yes. It has to do with the way that the internals of
} > parameter expansion were originally implemented (long before any kind
} > of reverse-subscripting was possible) and what it was reasonable to
} > layer on top of that.
}
} It's still a rather confusing bug since there's no indication you can
} can only do this with forward array indexing.
Er, but the doc quite correctly says you can't do *anything* else with
the (i) flag, and what you just wrote about (w) is actually wrong:
schaefer<521> print $X[(wi)p*]
9
schaefer<522> print $X[(wr)p*]
paz
schaefer<523> print $X[(wR)f*]
foo
The (w) flag works just fine with (r) and (R), it's only (i) and (I)
that are oddballs.
} Index: Doc/Zsh/params.yo
} ===================================================================
} +separator is whitespace. Currently this flag does not work
} +with reverse subscripting (the tt(i), tt(I), tt(r) and tt(R) flags).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author