From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6041 invoked from network); 25 Nov 1999 19:40:06 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Nov 1999 19:40:06 -0000 Received: (qmail 1039 invoked by alias); 25 Nov 1999 19:39:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8784 Received: (qmail 1017 invoked from network); 25 Nov 1999 19:39:57 -0000 From: "Bart Schaefer" Message-Id: <991125193953.ZM7636@candle.brasslantern.com> Date: Thu, 25 Nov 1999 19:39:53 +0000 In-Reply-To: <199911250954.KAA03611@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: Questions (and PATCH: small change to _complete)" (Nov 25, 10:54am) References: <199911250954.KAA03611@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: Questions (and PATCH: small change to _complete) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 25, 10:54am, Sven Wischnowsky wrote: } Subject: Re: Questions (and PATCH: small change to _complete) } } I wrote: } } > When completing in command position, _normal appends `-complete-' to } > the context name (e.g. `:complete:-command-'). This is fine. When } > completing arguments of commands, however, it only appends the command } > name (e.g. `:complete:dvips'). I'm a bit worried that someday we will } > find out that we have used a tag name that is also the name of a } > command and then it's non-trivial to write a compstyle-pattern that } > correctly matches only the command name. } } Ouch ;-) There was already the cvs tag. } } For now this patch makes command names be preceded and followed by two } colons. I.e. to unambiguously match the command name you can now do } `*::cvs:*' and to test for a command/tag combination: `*::command:*:tag'. This only solves the problem in one direction, doesn't it? That is, now you can tell that tag is not a command name, but how do you tell that a command name is not a tag? What I mean is, if testing "*:cvs:*" to find the cvs tag, but the context is "...::cvs::..." because the command name is "cvs", then the tag branch is going to be taken because "*:cvs:*" matches both "::cvs::" and ":cvs:". It's a pain to have to test "*[^:]:cvs:*" just to be sure, especially since that won't match if "cvs" is the first thing in the context (or is that impossible for a tag name?). } And I forgot to say that before the next release we should make sure } that we set up good defaults for styles and probably improve the } default _sort_tags. But I think this should really be done at the end. I still need some good examples of styles. As I mentioned before, I'd never done much with compconf, so I didn't have anything for the "new" compconf to convert into styles. Consequently, I'm now back almost to the bottom of the learning curve in understanding exactly what I can or might want to do, and how. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com