From: George Dunlap <george.dunlap@eu.citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 1/8] Add core.sh and wrapper function
Date: Tue, 14 Apr 2015 15:44:13 +0100 [thread overview]
Message-ID: <552D27BD.8060501@eu.citrix.com> (raw)
In-Reply-To: <1429019721.15516.59.camel@citrix.com>
On 04/14/2015 02:55 PM, Ian Campbell wrote:
> On Mon, 2015-04-13 at 17:13 +0100, Stefano Stabellini wrote:
>> I think it might be OK to have something like 5) just for the command
>> line parsing in raise, for the sake of giving more flexibility to the
>> user. Also it would be confined to one specific call site. But I am
>> uncertain that the pros outweigh the cons in this case.
>
> I've only glanced at it, but isn't this largely replicating getopt(1)?
> Perhaps without requiring -- on the options, but having the -- is more
> conventional I think.
For the top-level command-line parsing, yeah, I wouldn't think
introducing that crazy macro would be worth it; doing getopt just the
one time is probably worth it.
For the internal calling convention, setting up getopt at the top fo
every single function would be a nightmare. I have been using the
$arg_parse calling convention in my own script library for several years
now, and believe me, it is a *lot* nicer.
-George
next prev parent reply other threads:[~2015-04-14 14:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 19:29 raisin: Refactor to be more like a library George Dunlap
2015-04-09 19:29 ` [PATCH 1/8] Add core.sh and wrapper function George Dunlap
2015-04-09 19:40 ` George Dunlap
2015-04-10 14:30 ` Stefano Stabellini
2015-04-10 14:29 ` Stefano Stabellini
2015-04-13 10:23 ` George Dunlap
2015-04-13 10:41 ` George Dunlap
2015-04-13 16:13 ` Stefano Stabellini
2015-04-14 13:55 ` Ian Campbell
2015-04-14 14:44 ` George Dunlap [this message]
2015-04-15 8:29 ` Ian Campbell
2015-04-09 19:29 ` [PATCH 2/8] Remove redundant "source" from component definitions George Dunlap
2015-04-10 11:05 ` Stefano Stabellini
2015-04-09 19:29 ` [PATCH 3/8] Move common-functions.sh and git-checkout.sh into lib George Dunlap
2015-04-10 11:05 ` Stefano Stabellini
2015-04-09 19:29 ` [PATCH 4/8] Import raise.sh and unraise.sh into library George Dunlap
2015-04-10 14:29 ` Stefano Stabellini
2015-04-09 19:29 ` [PATCH 5/8] Allow the user's config to live outside of git George Dunlap
2015-04-10 14:30 ` Stefano Stabellini
2015-04-09 19:29 ` [PATCH 6/8] xen: Replace iasl with acpica-tools George Dunlap
2015-04-10 11:05 ` Stefano Stabellini
2015-04-09 19:29 ` [PATCH 7/8] xen: Require wget George Dunlap
2015-04-10 11:06 ` Stefano Stabellini
2015-04-09 19:29 ` [PATCH 8/8] Refactor package dependency checking and installation George Dunlap
2015-04-10 14:30 ` Stefano Stabellini
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=552D27BD.8060501@eu.citrix.com \
--to=george.dunlap@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.