Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: sudo completion problem



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