public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@redhat.com>
To: Nurdin Premji <npremji@redhat.com>
Cc: Frysk List <frysk@sourceware.org>
Subject: Re: Fhpd Commands option parsing
Date: Thu, 26 Jul 2007 20:36:00 -0000	[thread overview]
Message-ID: <46A90604.4070608@redhat.com> (raw)
In-Reply-To: <46A90311.8080601@redhat.com>

Nurdin Premji wrote:
> I am creating a small option parser based on the getopt option parser 
> for fhpd commands, (okay so the only thing being carried over is the 
> Options class). I want to avoid having to do too many fancy things to 
> add extra options, I like the ability to say parser.addOption and have 
> it know what to do. I'd also like a standard help option for each 
> command that doesn't exit the fhpd when run.
>
> I'm making a few assumptions about the possible options for the fhpd 
> internal commands:
> 1. All options are at the end.
> I.e. command [parameters ...] [options ...]
> 2. No option has arguments.
>
> Are these safe assumptions? Are there more I can count on?
>
Well you can delete #2 :-(

    print -x -format x

from memory (print "x" negated as hex?).  An equivalent to "--" to halt 
option parsing might help.

Andrew

      reply	other threads:[~2007-07-26 20:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26 20:24 Nurdin Premji
2007-07-26 20:36 ` Andrew Cagney [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=46A90604.4070608@redhat.com \
    --to=cagney@redhat.com \
    --cc=frysk@sourceware.org \
    --cc=npremji@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).