From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 432 invoked from network); 17 Jun 1998 16:12:21 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 17 Jun 1998 16:12:21 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id MAA26504; Wed, 17 Jun 1998 12:07:19 -0400 (EDT) Resent-Date: Wed, 17 Jun 1998 12:07:03 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980617090730.ZM15226@candle.brasslantern.com> Date: Wed, 17 Jun 1998 09:07:30 -0700 In-Reply-To: <9806171510.AA08785@ezdzit.zko.dec.com> Comments: In reply to Paul Lew "compctl tips needed on words with common prefix" (Jun 17, 11:10am) References: <9806171510.AA08785@ezdzit.zko.dec.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Paul Lew , zsh-users@math.gatech.edu Subject: Re: compctl tips needed on words with common prefix MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"cvP1W1.0.PT6.cc-Xr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1626 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jun 17, 11:10am, Paul Lew wrote: } Subject: compctl tips needed on words with common prefix } } compctl -k "(ci co construct cinema)" \ } -x "r[co,;]" -k "(co1 co2 co3)" \ } - "r[construct,;]" -k "(cons1 cons2)" -- xxx } } I could not get 'construct' to be completed by because the 'co' } is recognized first The problem is with the "r[co,;]" -- that's what is spotting the "co" and insisting that only 1 2 or 3 may follow it. What you mean to say, I think, is that any of (co1 co2 co3) may appear *after* "co ". Right? In that case, what you want is "c[-1,co]": compctl -k "(ci co construct cinema)" \ -x "c[-1,co]" -k "(co1 co2 co3)" \ - "c[-1,construct]" -k "(cons1 cons2)" -- xxx The above will complete to produce command lines like xxx co co2 construct cons1 cinema xxx construct cons2 cinema co co1 xxx co co2 ci construct cons1 cinema co co1 That is, always requiring "co co[123]" and "construct cons[12]" to be paired, but allowing the pairs of them to appear anywhere and to be interspersed with "ci" and "cinema". -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com