From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2142 invoked from network); 14 Mar 2002 12:04:09 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Mar 2002 12:04:09 -0000 Received: (qmail 19795 invoked by alias); 14 Mar 2002 12:03:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16829 Received: (qmail 19783 invoked from network); 14 Mar 2002 12:03:52 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15504.37248.85718.601896@wischnow.berkom.de> Date: Thu, 14 Mar 2002 13:03:12 +0100 To: zsh-workers@sunsite.dk Subject: Re: Redirection completion In-Reply-To: <26367.1016038533@csr.com> References: <15503.6928.151944.873784@wischnow.berkom.de> <26367.1016038533@csr.com> X-Mailer: VM 6.95 under 21.5 (patch 3) "asparagus" XEmacs Lucid Peter Stephenson wrote: > ... > > It seems vaguely preferable to allow the user to omit trailing > `,-default-' bits when defining commands (it's not important in style > contexts since you would usually use a wildcard anyway), but it doesn't > actually gain you anything apart from laxity. That would only work if that would mean to omit the commas, too, because I think the distinction between an empty field (no command on the line) and -default- may sometime be good to have. I may be wrong, of course. > > I.e.: > > should `-redirect-,-default-,echo' or `-redirect-,>,-default-' take > > precedence? > > It seems more logical that the command variant should take precedence, > although the order of the parts would imply otherwise. Yes, that's the kind of philosophical question I was thinking about. The whole style-context name is sorted least-to-most-specific. Other comments? > ... > > This seems OK unless we do something more complicated with pattern > handling, e.g. some way of matching the point at which you want the > pattern tried. But I don't see any great call for that at the moment. Nor do I, really... Oliver on the same topic: > Hmm, we might want to define -redirect-,<,-default- and would want > patterns tried before that. I think the post-patterns should perhaps be > tried just before -default- is first tried in the command position for > redirection and in the parameter name position for values. Or perhaps, > we need to look to see where each post-pattern uses -default-. If it > uses a pattern for one part then we should use it before trying > -default- for that part. We might need to require patterns to all be > of the form -whatever-,pattern,pattern. I think we should wait until we find something where we need a different behaviour and then implement that (or the thing that solves the problem behind the problem). We can add possibilities quite easily because we already use the $_compskip parameter there (implementation could be somewhat more complicated, depending on what we want). Bye Sven -- Sven Wischnowsky wischnow@berkom.de