From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10793 invoked from network); 30 Sep 1997 05:06:16 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 30 Sep 1997 05:06:16 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id AAA04347; Tue, 30 Sep 1997 00:57:09 -0400 (EDT) Resent-Date: Tue, 30 Sep 1997 00:57:09 -0400 (EDT) From: "Bart Schaefer" Message-Id: <970929215720.ZM13692@candle.brasslantern.com> Date: Mon, 29 Sep 1997 21:57:19 -0700 In-Reply-To: <9709290629.AA08437@gamma.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: compctl -Tx 'w[0,...] ...' ..." (Sep 29, 8:29am) References: <9709290629.AA08437@gamma.informatik.hu-berlin.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Sven Wischnowsky , zsh-workers@math.gatech.edu Subject: Re: compctl -Tx 'w[0,...] ...' ... MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"Vr0l22.0.s31.bQ8Cq"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3540 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Sep 29, 8:29am, Sven Wischnowsky wrote: } Subject: Re: compctl -Tx 'w[0,...] ...' ... } } "Bart Schaefer" wrote: } > } > Now you may be wondering, what's the point of all this? Well, at first it } > was just a desire to have something like compctl -T but that kicked in only } > after everything else failed. (You can almost get this with -D, but only } > for commands that don't already have some other completion.) } } Hm, using flags before a `-x' or `+' with no flags following it } (continue with default completion) aren't enough? I don't completely understand the question, I'm afraid. What I want is a completion that applies to *all* commands, as do -D and -T, but that is triggered *after* any other completion provided for any specific command. I guess I could get the effect by altering every other completion I ever define to end with the "continue using default" switch; but that means keeping my own edited copies of all the examples from the zsh dist, etc. } Could I get an example, please? The example I was thinking of was compctl -Tx 'n[1,=]' -f That says to complete file names after the first `=' in any word, for any command. Because it's a -T, it gets used *before* something like this: compctl -x 'C[0,conv=*,*] n[-1,,], s[conv=]' \ -k '(ascii ebcdic ibm block unblock lcase ucase swap noerror sync)' \ -q -S ',' -- dd so then you can't complete conv= in a dd-specific way. I want 'n[1,=]' -f to apply to every command, but *after* the specific completions are tried. } But I admit that I didn't think of using `-T' with `w[0,...]'... } } > Also, if you convert all your compctls to one big -T like that, then you } > can replace 'w[0,string]' with 'W[0,pattern]' and get an effect that a few } > persistent zsh-users have been requesting for some years: pattern matching } > on the command name when defining a completion. } > } } Huh? That wouldn't be that difficult to implement (I think) and I } don't remember a request for it... I'm pretty sure I requested it myself ... an example would be to set up a compctl so that every command matching `x*' would accept the standard X toolkit completions (-display, -xrm, etc.). The reason it might be hard is because you could end up with multiple different compctl lines that match the same command: compctl -k '(-display -geometry -xrm)' x* compctl -k hosts xhosts How would the ambiguity be resolved? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com