[GRASS-SVN] r62169 - in grass/trunk: general/g.parser lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Oct 3 10:49:38 PDT 2014


Author: wenzeslaus
Date: 2014-10-03 10:49:38 -0700 (Fri, 03 Oct 2014)
New Revision: 62169

Modified:
   grass/trunk/general/g.parser/g.parser.html
   grass/trunk/lib/gis/gislib_cmdline_parsing.dox
   grass/trunk/lib/gis/parser_html.c
   grass/trunk/lib/gis/parser_rest.c
Log:
parser: use '--help' in manual pages rather than 'help' to promote use of standardized flag

This was also suggested by Glynn in #1778:

    ...it would be nice if we could train users to use that so that we can remove the argv[1]=='help' check; although help isn't likely to be particularly common as an option value, I dislike having special cases on principle.


Modified: grass/trunk/general/g.parser/g.parser.html
===================================================================
--- grass/trunk/general/g.parser/g.parser.html	2014-10-03 15:17:59 UTC (rev 62168)
+++ grass/trunk/general/g.parser/g.parser.html	2014-10-03 17:49:38 UTC (rev 62169)
@@ -15,7 +15,7 @@
 scripts.
 
 <h2>SYNOPSIS</h2>
-<b>g.parser help</b><br>
+<b>g.parser --help</b><br>
 <b>g.parser</b> [-<b>s</b>] [-<b>t</b>] <em>filename</em> [<em>argument</em>,...]
 
 <h3>Flags:</h3>

Modified: grass/trunk/lib/gis/gislib_cmdline_parsing.dox
===================================================================
--- grass/trunk/lib/gis/gislib_cmdline_parsing.dox	2014-10-03 15:17:59 UTC (rev 62168)
+++ grass/trunk/lib/gis/gislib_cmdline_parsing.dox	2014-10-03 17:49:38 UTC (rev 62169)
@@ -865,7 +865,7 @@
 Yes. There are a few conventions. Options which identify a single input map 
 are usually "map=", not "raster=" or "vector=". In the case of an 
 input and output map the convention is: "input=xx output=yy". By passing 
-the 'help' option to existing GRASS commands, it is likely that you will 
+the '--help' flag to existing GRASS commands, it is likely that you will 
 find other conventions. The desire is to make it as easy as possible for the 
 user to remember (or guess correctly) what the command line syntax is for a 
 given command.

Modified: grass/trunk/lib/gis/parser_html.c
===================================================================
--- grass/trunk/lib/gis/parser_html.c	2014-10-03 15:17:59 UTC (rev 62168)
+++ grass/trunk/lib/gis/parser_html.c	2014-10-03 17:49:38 UTC (rev 62169)
@@ -74,7 +74,7 @@
     }
     fprintf(stdout, "<h2>%s</h2>\n", _("SYNOPSIS"));
     fprintf(stdout, "<div id=\"name\"><b>%s</b><br></div>\n", st->pgm_name);
-    fprintf(stdout, "<b>%s help</b><br>\n", st->pgm_name);
+    fprintf(stdout, "<b>%s --help</b><br>\n", st->pgm_name);
 
     fprintf(stdout, "<div id=\"synopsis\"><b>%s</b>", st->pgm_name);
 

Modified: grass/trunk/lib/gis/parser_rest.c
===================================================================
--- grass/trunk/lib/gis/parser_rest.c	2014-10-03 15:17:59 UTC (rev 62168)
+++ grass/trunk/lib/gis/parser_rest.c	2014-10-03 17:49:38 UTC (rev 62169)
@@ -77,7 +77,7 @@
     }
     fprintf(stdout, "\n%s\n----------------------\n", _("SYNOPSIS"));
     fprintf(stdout, "**%s**\n\n", st->pgm_name);
-    fprintf(stdout, "**%s** help\n\n", st->pgm_name);
+    fprintf(stdout, "**%s** --help\n\n", st->pgm_name);
 
     fprintf(stdout, "**%s**", st->pgm_name);
 



More information about the grass-commit mailing list