From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 533 invoked from network); 17 Jun 1998 16:37:39 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 17 Jun 1998 16:37:39 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id MAA28159; Wed, 17 Jun 1998 12:33:14 -0400 (EDT) Resent-Date: Wed, 17 Jun 1998 12:33:04 -0400 (EDT) Date: Wed, 17 Jun 1998 12:33:28 -0400 Message-Id: <9806171633.AA09038@ezdzit.zko.dec.com> From: Paul Lew To: "Bart Schaefer" Cc: Paul Lew , zsh-users@math.gatech.edu Subject: Re: compctl tips needed on words with common prefix In-Reply-To: <980617090730.ZM15226@candle.brasslantern.com> References: <9806171510.AA08785@ezdzit.zko.dec.com> <980617090730.ZM15226@candle.brasslantern.com> X-Mailer: VM 6.37 under Emacs 20.2.1 Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Resent-Message-ID: <"AW6g62.0.It6.---Xr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1628 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >>>>> "Bart" == Bart Schaefer writes: Bart> On Jun 17, 11:10am, Paul Lew wrote: Bart> } Subject: compctl tips needed on words with common prefix Bart> } Bart> } compctl -k "(ci co construct cinema)" \ Bart> } -x "r[co,;]" -k "(co1 co2 co3)" \ Bart> } - "r[construct,;]" -k "(cons1 cons2)" -- xxx Bart> } Bart> } I could not get 'construct' to be completed by Bart> } because the 'co' is recognized first Bart> The problem is with the "r[co,;]" -- that's what is spotting Bart> the "co" and insisting that only 1 2 or 3 may follow it. Bart> What you mean to say, I think, is that any of (co1 co2 co3) Bart> may appear *after* "co ". Right? In that case, what you Bart> want is "c[-1,co]": Bart> compctl -k "(ci co construct cinema)" \ Bart> -x "c[-1,co]" -k "(co1 co2 co3)" \ Bart> - "c[-1,construct]" -k "(cons1 cons2)" -- xxx Bart> The above will complete to produce command lines like Bart> xxx co co2 construct cons1 cinema Bart> xxx construct cons2 cinema co co1 Bart> xxx co co2 ci construct cons1 cinema co co1 That works. But my situation is a little different, what I would like is to have "co1 co2 co3" be part of the completion words as long as there is a word "co" in front, i.e., xxx co co1 co2 or xxx co co3 co1 co2 Do c[offset,string] require a fixed offset or can be a range? Use -1 as offset will only work for the 1st word. Also, I still want to be able to complete the 'construct'. Any option left? Thanks...