zsh-users
 help / color / mirror / code / Atom feed
From: "Jesper Nygårds" <jesper.nygards@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@zsh.org
Subject: Re: Putting options after tasks
Date: Thu, 15 Mar 2012 08:31:44 +0100	[thread overview]
Message-ID: <CABZhJg_2Oro98KXQ_-ry4XcA-1zzO32fjeXQbVqaWN7==8SNzQ@mail.gmail.com> (raw)
In-Reply-To: <120314101917.ZM25639@torch.brasslantern.com>

On Wed, Mar 14, 2012 at 6:19 PM, Bart Schaefer
<schaefer@brasslantern.com> 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.


  reply	other threads:[~2012-03-15  7:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14  8:53 Jesper Nygårds
2012-03-14 17:19 ` Bart Schaefer
2012-03-15  7:31   ` Jesper Nygårds [this message]
2012-03-14 18:30 ` Mikael Magnusson
2012-03-15  7:33   ` Jesper Nygårds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABZhJg_2Oro98KXQ_-ry4XcA-1zzO32fjeXQbVqaWN7==8SNzQ@mail.gmail.com' \
    --to=jesper.nygards@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).