Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: sudo completion problem
- X-seq: zsh-workers 11127
- From: Zefram <zefram@xxxxxxxx>
- To: Andrej Borsenkow <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- Subject: Re: PATCH: Re: sudo completion problem
- Date: Wed, 3 May 2000 16:09:00 +0100 (BST)
- Cc: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <001001bfb50f$d2283310$21c9ca95@xxxxxxxxxxxxxx> from Andrej Borsenkow at "May 3, 2000 06:56:54 pm"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author