From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2073 invoked from network); 8 Mar 2002 13:21:56 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 Mar 2002 13:21:56 -0000 Received: (qmail 10617 invoked by alias); 8 Mar 2002 13:21:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16783 Received: (qmail 10606 invoked from network); 8 Mar 2002 13:21:43 -0000 Message-ID: <20020308132041.10760.qmail@web9305.mail.yahoo.com> Date: Fri, 8 Mar 2002 13:20:41 +0000 (GMT) From: =?iso-8859-1?q?Oliver=20Kiddle?= Subject: Re: Redirection completion To: Zsh hackers list In-Reply-To: <21013.1015590794@csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit --- Peter Stephenson wrote: > Next, it looks like the context for redirections isn't all that > helpful > at the moment. After `echo 2>' I seem to get just > `:completion::complete:echo::'. Could we have something like the way > arguments work, so that it at least indicates we're in a redirection, > and preferably also the `2>' bit? Along the lines of > :completion::complete:dvips:option-o-1: > I would suggest > :completion::complete:echo:redir-2>:' > for `echo 2>'. The context isn't too useful for values either. I'm not sure about putting the information in the fifth (argument) part of the context. For values the fourth (command) part is just set to -value-. What I would suggest is that we use the fourth part of the context. It is currently defined as the command so it would make sense to use it as the dispatch key. So we could have contexts which are something like: :completion::complete:-redirect-echo-2>: :completion::complete:-value-GZIP: Exact format could be different. My point is about what component of the context is used. > _wanted logfiles expl 'log files' _path_files -g "*.log" && return 0 > _wanted all-files expl 'all files' _files This looks like another example of why default tag-orders as I described before would be a good idea. Oliver __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com