zsh-users
 help / color / mirror / code / Atom feed
From: Atte Peltomaki <atte.peltomaki@iki.fi>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: zparseopts and longopts
Date: Sun, 15 May 2016 18:06:55 +0300	[thread overview]
Message-ID: <20160515150655.GI12777@ass.pp.htv.fi> (raw)
In-Reply-To: <CAH+w=7ZkukYXP4r1W9=_fEOGwzfqHtg9EeGpJxF=atYcOZFb0w@mail.gmail.com>

On Fri, May 13, 2016 at 04:25:28AM -0700, Bart Schaefer wrote:
> On Thu, May 12, 2016 at 4:16 AM, Atte Peltomaki <atte.peltomaki@iki.fi> wrote:
> > Executing with imaginary new option:
> >
> > % ./test.zsh --gnu argh --gnu-tard rms --gnu-tard-added-even-longer-opt whyohwhy
> > --gnu argh
> > --gnu-tard -added-even-longer-opt
> 
> Well, you've told zparseopts that --gnu-tard is an option that takes a
> mandatory argument, and you have not told zparseopts that
> --gnu-tard-add... is an option, and the argument of an option is
> allowed to appear in the same word as the option itself (so that -a2
> is the same as -a 2), so zparseopts believes -add... is the argument
> of the option you told it about.

Makes sense, but also makes it impossible to use zparseopts with a
caller that may spontaneously add options and expect scripts to work
unmodified.

-- 
Atte Peltomäki
     atte.peltomaki@iki.fi <> http://kameli.org
"Your effort to remain what you are is what limits you"


      reply	other threads:[~2016-05-15 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 11:16 Atte Peltomaki
2016-05-13 11:25 ` Bart Schaefer
2016-05-15 15:06   ` Atte Peltomaki [this message]

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=20160515150655.GI12777@ass.pp.htv.fi \
    --to=atte.peltomaki@iki.fi \
    --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).