From: Florian Mickler <florian@mickler.org>
To: Joe Perches <joe@perches.com>
Cc: akpm@linux-foundation.org,
Stephen Hemminger <shemminger@vyatta.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] get_maintainer.pl: improve config-file support
Date: Thu, 13 May 2010 09:56:52 +0200 [thread overview]
Message-ID: <20100513095652.34aea727@schatten.dmk.lab> (raw)
In-Reply-To: <1273703333.20514.392.camel@Joe-Laptop.home>
On Wed, 12 May 2010 15:28:53 -0700
Joe Perches <joe@perches.com> wrote:
> On Wed, 2010-05-12 at 23:12 +0200, florian@mickler.org wrote:
> > This changes the syntax of the config-file introduced in the commit
> > "scripts/get_maintainer.pl: add .get_maintainer.conf default options
> > file".
> > Entries are now of the more commonly found form:
> > key = value
> > where keys are cmd-line arguments without the "--" prefixed.
>
> I don't have a strong opinion one way or another about the
> .conf file format.
>
> Another option which could be useful: --noconf, don't read the file.
>
> > as well as warn if unrecognized options are
> > specified.
>
> The old approach does that as well.
True.
>
> > +if (!GetOptions( \%prefs,
>
> I think you don't need to repeat the options.
> Doesn't this work?
> if (!GetOptions(\%prefs)) {
> die "$P: invalid argument - use --help if necessary\n";
>
No, GetOpts::Long needs a special markup for parsing the cmdline
string, like =s for specifying that that option is accompanied by a
string value or the ! for specifying that it is a flag.
Also there are aliases defined for config-options.
Cheers,
Flo
p.s.: maybe there is a GetOpts feature to use config-files?
next prev parent reply other threads:[~2010-05-13 7:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 21:12 florian
2010-05-12 22:28 ` Joe Perches
2010-05-13 7:56 ` Florian Mickler [this message]
2010-05-20 6:46 ` Florian Mickler
2010-05-21 20:13 ` Andrew Morton
2010-05-21 20:21 ` Joe Perches
2010-05-21 21:08 ` Florian Mickler
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=20100513095652.34aea727@schatten.dmk.lab \
--to=florian@mickler.org \
--cc=akpm@linux-foundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome