All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Wray <mike.wray@hpl.hp.com>
To: Mike Wray <mike.wray@hplb.hpl.hp.com>
Cc: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>,
	Steven Hand <Steven.Hand@cl.cam.ac.uk>,
	xen-devel@lists.sourceforge.net
Subject: Re: xm create option parsing..
Date: Fri, 30 Jul 2004 10:16:14 +0100	[thread overview]
Message-ID: <410A11DE.6080809@hpl.hp.com> (raw)
In-Reply-To: <410A1004.2050801@hpl.hp.com>

Mike Wray wrote:

> Ian Pratt wrote:
> 
>>  
>>
>>> It's an artifact of getopt - it stops parsing options at
>>> the first non-option. So
>>>
>>> It think there's a getopt flag to process options anywhere
>>> in the args, but this is a problem for a multicommand like xm
>>> that has its own options as well as subcommand options.
>>>
>>> Basically options (-x, --x) have to precede args.
>>
>>
>>
>> I think the current behaviour is sufficiently unintuitive that we
>> need to fix it: after finding the sub command, we should scan the
>> whole of the rest of the command line for args.
>>
>> What does -x and --x do ?  I couldn't find them in the help
>> message.
> 
> 
> Just example option flags.
> 
>>
>> I think the best policy is to ensure that arg flags never clash
>> between 'xm' and it's sub commands (I don't believe we currently
>> have any clashes), and to look for them in any position.
> 
> 
> 
> We potentially have
> 
> xm <xm options> subcommand <subcommand options/args>
> 
> It doesn't really make sense to allow xm options after the subcommand.
> 
> Each subcommand is responsible for parsing its own options, so
> we could get 'xm create' etc. to allow options after the args.
> I'll make the change.

Oops. The gnu-style getopt parsing is a Python 2.3 feature - not
available in 2.2. So we can't enable it at the moment.

Mike



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com

  reply	other threads:[~2004-07-30  9:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-28 16:37 xm create option parsing Steven Hand
2004-07-28 16:45 ` Tom Wilkie
2004-07-28 17:10   ` Ian Pratt
2004-07-28 17:16     ` Tom Wilkie
2004-07-30  8:19 ` Mike Wray
2004-07-30  8:42   ` Steven Hand
2004-07-30  8:49   ` Ian Pratt
2004-07-30  9:08     ` Mike Wray
2004-07-30  9:16       ` Mike Wray [this message]
2004-07-30  9:59         ` Ian Pratt
2004-07-30 13:41           ` Mike Wray
2004-07-30  9:53       ` Ian Pratt

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=410A11DE.6080809@hpl.hp.com \
    --to=mike.wray@hpl.hp.com \
    --cc=Ian.Pratt@cl.cam.ac.uk \
    --cc=Steven.Hand@cl.cam.ac.uk \
    --cc=mike.wray@hplb.hpl.hp.com \
    --cc=xen-devel@lists.sourceforge.net \
    /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.