From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8594 invoked from network); 11 Mar 2002 10:56:25 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 11 Mar 2002 10:56:25 -0000 Received: (qmail 9045 invoked by alias); 11 Mar 2002 10:56:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16798 Received: (qmail 9033 invoked from network); 11 Mar 2002 10:56:17 -0000 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Redirection completion In-reply-to: "Sven Wischnowsky"'s message of "Mon, 11 Mar 2002 09:42:33 +0100." <15500.28153.769884.199234@wischnow.berkom.de> Date: Mon, 11 Mar 2002 10:54:49 +0000 Message-ID: <3922.1015844089@csr.com> From: Peter Stephenson Sven Wischnowsky wrote: > So, I wrote the patch below. Removing the -T stuff and consistently > using names like `-value-foo' or `-redirect-echo-2>' everywhere, both > for the context used for styles and for compdef/#compdef (that's why > we don't need separated sets of completion functions anymore). This makes a lot of sense. I haven't quite understood how this system handles the difference between `-redirect-2>' and `-redirect-echo-2>'. Suppose I defined a redirection for the former, will I still get a context including `-redirect-echo-2>'? And is that the same for a plain `-redirect-'? I would guess yes, since the context depends on what you are completing rather than what function is doing it (and patterns are a more natural part of styles than of compdef definitions). The only worry is that someone, somewhere will decide it's a great idea to have commands beginning with `-' for some special use. I don't see how we can guard against that in general, though. We can't make the current set of completion functions indendent of the choice of character. We may just as well stick with -. Maybe we could allow it to be escaped, like `:' (often) can be. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************