Eli Cohen wrote:
Hi,
the following patch removes the square brackets and elipsis from
unamed-opts so that the help string printed is more standard and make
more sense (path is both inline and attached).
Index: src/gm.cc
===================================================================
--- src.orig/gm.cc
+++ src/gm.cc
@@ -650,7 +650,7 @@ CmdlineParserCreator::generate_usage_str
}
if ( unamed_options )
- usage << " [" << unamed_options << "]...";
+ usage << " " << unamed_options;
string wrapped;
------------------------------------------------------------------------
Index: src/gm.cc
===================================================================
--- src.orig/gm.cc
+++ src/gm.cc
@@ -650,7 +650,7 @@ CmdlineParserCreator::generate_usage_str
}
if ( unamed_options )
- usage << " [" << unamed_options << "]...";
+ usage << " " << unamed_options;
string wrapped;
Hi Eli
Thanks for the patch!
However, I wouldn't want to get rid of [ ] brackets which mean that
those parts are optional (and as far as I know they are standard for
this matter). For instance, ls --help produces
Usage: ls [OPTION]... [FILE]...
while cp --help
cp [OPTION]... [-T] SOURCE DEST
For the moment I'd use the usage string (as I wrote in my other answer
to your mail).
Actually, unnamed options are almost left to the programmer (although
I'm working on a way of making them more definable in the .ggo file
itself: e.g., a way to require them, to name them, etc.).
I hope to hear from you soon
cheers
Lorenzo
--
+-----------------------------------------------------+
| Lorenzo Bettini ICQ# lbetto, 16080134 |
| PhD in Computer Science, DSI, Univ. di Firenze |
| Florence - Italy (GNU/Linux User # 158233) |
| http://www.lorenzobettini.it |
| http://tronprog.blogspot.com BLOG |
| http://www.purplesucker.com Deep Purple Cover Band |
| http://www.gnu.org/software/src-highlite |
| http://www.gnu.org/software/gengetopt |
| http://www.lorenzobettini.it/software/gengen |
| http://www.lorenzobettini.it/software/doublecpp |
+-----------------------------------------------------+
_______________________________________________
Help-gengetopt mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gengetopt