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

Re: Putting options after tasks



On Wed, Mar 14, 2012 at 6:19 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> _arguments is designed to assume that programs accept all options first
> and all other arguments after them.

Naive question: why? It seems to be a great deal of programs can take
their options at any position nowadays.

> Given that the tasks and options can be freely mixed in this way, I
> presume that none of the options take a following argument (that is,
> "--foobar zoom" never means that "zoom" must appear immediately after
> "--foobar").

No, unfortunately that's not true, only my simplified example gave
that impression. In reality, some of the options can take a following
argument.

> If that's true, then one possibility...

Thank you very much for this, Bart. Since Mikael has reported that it
seems to work going down the _arguments route, I'll have a go at that,
and see if it works also when I expand my example to the real set of
options. I'll report back if I run into trouble.



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