From: Peter Stephenson <p.stephenson@samsung.com>
To: dana <dana@dana.is>, zsh-workers@zsh.org
Subject: Re: [PATCH] getopts: Accurately report '-x' or '+x' in error messages
Date: Fri, 01 Dec 2017 09:20:26 +0000 [thread overview]
Message-ID: <20171201092026.269c1dcb@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <733779CE-86B9-4178-B38B-7E64390BB4C6@dana.is>
On Fri, 1 Dec 2017 01:12:15 -0600
dana <dana@dana.is> wrote:
> getopts error messages about illegal options or missing values always reference
> the -x variant of the option, even if the +x one was used instead. The included
> patch simply makes it report the correct prefix.
>
> PS: There are a few other places in the code where it seems that the - prefix is
> hard-coded into the error message, but i didn't actually check to see if that
> was a problem. This patch in addition to the previous one should cover most
> cases people are likely to run into, though, i'd think.
>
> PPS: I didn't add any tests because there aren't any for getopts — let me know
> if you'd like me to create some.
Thanks, I've committed this. I'd be happy to add some getopts tests if
you came up with any.
pws
next prev parent reply other threads:[~2017-12-01 9:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20171201071310epcas1p4e06bf3264433a5d7318fbb9d6c594c18@epcas1p4.samsung.com>
2017-12-01 7:12 ` dana
2017-12-01 9:20 ` Peter Stephenson [this message]
2017-12-01 9:39 ` dana
2017-12-01 9:48 ` Peter Stephenson
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=20171201092026.269c1dcb@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=dana@dana.is \
--cc=zsh-workers@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).