From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21585 invoked from network); 3 May 2000 15:09:42 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 May 2000 15:09:42 -0000 Received: (qmail 18156 invoked by alias); 3 May 2000 15:09:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11127 Received: (qmail 18139 invoked from network); 3 May 2000 15:09:33 -0000 Subject: Re: PATCH: Re: sudo completion problem In-Reply-To: <001001bfb50f$d2283310$21c9ca95@mow.siemens.ru> from Andrej Borsenkow at "May 3, 2000 06:56:54 pm" To: Andrej Borsenkow Date: Wed, 3 May 2000 16:09:00 +0100 (BST) CC: Sven Wischnowsky , zsh-workers@sunsite.auc.dk X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Andrej Borsenkow wrote: >I think, it was the result of change for find (do not have article >handy) - in ``find /tmp -user'' -user was not recognised as option >because /tmp already was argument. So, this change made options be found >everywhere, even after arguments :-) That's the wrong way to do it. In the find command line, `-user' is not an option, it's an expression (or part thereof). The expression starts with the first argument that starts with `-' and continues to the end of the line; the directory arguments must appear before the expression. Actual options are handled as dummy predicates, which is confusing to the user, but from our point of view means that they must be treated as part of the expression. find has a unique syntax, with no options having the usual option syntax. Therefore it shouldn't be handled by the standard option completion function; it needs a dedicated find-expression completion function. The standard option completion function should, as is standard syntax, process options only before the first non-option argument. No patch, sorry, I'm not up to speed on the completion functions yet. -zefram