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

Re: A couple of completion problems



Sven Wischnowsky wrote:

> So, what do you all think: should we make all automatically found
> options take their argument as being optional? Should we leave it to
> the calling functions? Or should we add a style that can be used to
> give a set of patterns and all options with matching names have their
> argument turned into an optional one?

So how would _arguments behave differently if the argument to the long
option is optional? My thinking is that the behaviour should be the same
anyway:

command --foo<tab>   should insert an '=' which is auto-removed by a
further space
command --foo=<tab>  should complete the arguments to the foo option
command --foo <tab>  the space (and lack of '=') surely means that we
have moved on from the foo option and should be completing other
options. If the argument to --foo is mandatory, then that's the user's
problem for not specifying it. By continuing to try to complete
arguments to --foo, zsh is going to achieve nothing.

I've probably missed the point somewhere though.

Thanks

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author