Re: is there a g_option_print_usage() command?
- From: Rick Jones <rick jones2 hp com>
- To: James Scott Jr <skoona verizon net>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: is there a g_option_print_usage() command?
- Date: Tue, 13 Mar 2007 10:18:51 -0700
James
Thanks for the example. I think it shows I wasn't clear in my initial
message because if I run the example (I stripped-out the libnotify stuff
as it wasn't on my system):
raj tardy:~/netperf4_gobject$ /tmp/example --help
Usage:
example [OPTION...] - APCUPSD Commandline Notification Utility GPL2
[2007] <Skoona users sourceforge net>
Help Options:
-?, --help Show help
options
Application Options:
-t, --title=Uninterruptible Power Supply Title text
on msg box
-m, --message=message Message
body text
-i, --icon-name=gtk-dialog-info ...-warning ...-error icon to
include next to message
-s, --show-seconds=10 seconds to
display message
raj tardy:~/netperf4_gobject$ /tmp/exmaple --bogus
-bash: /tmp/exmaple: No such file or directory
raj tardy:~/netperf4_gobject$ /tmp/example --bogus
** (example:9372): WARNING **: Parse command line failed: Unknown option
--bogus
What I am after is some way to display the same text as --help when one
uses a bogus command-line option. In other words I don't just want to
tell them that --bogus is a bogus option, I want to tell them what the
non-bogus options are. Since --help already does that, I was looking
for a call I could make to cause that same text to be emitted - rather
like one would used to do with a hand-built "usage string." Now that
the g_option_mumble stuff is emitting the equivalent to a usage string
for --help I want to use that rather than build a second one in parallel.
rick jones
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]