From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21958 invoked from network); 5 May 2001 17:28:34 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 May 2001 17:28:34 -0000 Received: (qmail 15938 invoked by alias); 5 May 2001 17:28:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14230 Received: (qmail 15902 invoked from network); 5 May 2001 17:28:26 -0000 From: "Bart Schaefer" Message-Id: <1010505172632.ZM20354@candle.brasslantern.com> Date: Sat, 5 May 2001 17:26:32 +0000 In-Reply-To: <010504172823.ZM19667@candle.brasslantern.com> Comments: In reply to "Bart Schaefer" "Re: PATCH: completion for subscript flags" (May 4, 5:28pm) References: <3AF333EC.7066178F@u.genie.co.uk> <010504172823.ZM19667@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Oliver Kiddle , zsh-workers@sunsite.dk Subject: Re: PATCH: completion for subscript flags MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 4, 5:28pm, Bart Schaefer wrote: } } On May 4, 11:57pm, Oliver Kiddle wrote: } > } > I'd appreciate if someone could check through my descriptions, } > particularly those for associative arrays. I have a suspicion that some } > of the flags aren't working actually but I may just be confused. } } I think you've got some of the descriptions wrong. The wording gets } tricky here. I'll commit the following rewrite of the descriptions. Feel free to rewrite it yet again if you think of better language. Index: Completion/Zsh/Context/_subscript =================================================================== --- Completion/Zsh/Context/_subscript 2001/05/05 16:16:08 1.2 +++ Completion/Zsh/Context/_subscript 2001/05/05 17:22:11 @@ -19,12 +19,12 @@ case ${(Pt)${compstate[parameter]}} in assoc*) flags=( - '(R k K i I)r[return first matching value]' - '(r k K i I)R[return value of first matching key]' - '(r R K i I)k[return all values with matching keys]' - '(r R k i I)K[return value of first matching key]' - '(r R k K I)i[return first matching key]' - '(r R k K i)I[return all matching keys]' + '(R k K i I)r[any one value matched by subscript as pattern]' + '(r k K i I)R[all values matched by subscript as pattern]' + '(r R K i I)k[any one value where subscript matched by key as pattern]' + '(r R k i I)K[all values where subscript matched by key as pattern]' + '(r R k K I)i[any one key matched by subscript as pattern]' + '(r R k K i)I[all keys matched by subscript as pattern]' );; (|scalar*)) flags=( 'w[make subscripting work on words of scalar]' @@ -32,11 +32,12 @@ 'p[recognise escape sequences in subsequent s flag]' );& array*) flags=($flags - 'n[specify match to return]' + 'n[Nth lowest/highest index with i/I/r/R flag]' 'b[begin with specified element]' - '(r R k K i)I[reverse subscript giving index of last match]' - '(r k K i I)R[reverse subscripting giving last match]' - '(R k K i I)r[reverse subscripting giving first match]' + '(r R k K i)I[highest index of value matched by subscript]' + '(r R k K I)i[lowest index of value matched by subscript]' + '(r k K i I)R[value matched by subscript at highest index]' + '(R k K i I)r[value matched by subscript at lowest index]' );; esac -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net