浏览代码

parser: use '--help' in manual pages rather than 'help' to promote use of standardized flag

This was also suggested by Glynn in https://trac.osgeo.org/grass/ticket/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.


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62169 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 10 年之前
父节点
当前提交
214beac382
共有 4 个文件被更改,包括 4 次插入4 次删除
  1. 1 1
      general/g.parser/g.parser.html
  2. 1 1
      lib/gis/gislib_cmdline_parsing.dox
  3. 1 1
      lib/gis/parser_html.c
  4. 1 1
      lib/gis/parser_rest.c

+ 1 - 1
general/g.parser/g.parser.html

@@ -15,7 +15,7 @@
 scripts.
 scripts.
 
 
 <h2>SYNOPSIS</h2>
 <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>,...]
 <b>g.parser</b> [-<b>s</b>] [-<b>t</b>] <em>filename</em> [<em>argument</em>,...]
 
 
 <h3>Flags:</h3>
 <h3>Flags:</h3>

+ 1 - 1
lib/gis/gislib_cmdline_parsing.dox

@@ -865,7 +865,7 @@ valid command line arguments:
 Yes. There are a few conventions. Options which identify a single input map 
 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 
 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 
 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 
 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 
 user to remember (or guess correctly) what the command line syntax is for a 
 given command.
 given command.

+ 1 - 1
lib/gis/parser_html.c

@@ -74,7 +74,7 @@ void G__usage_html(void)
     }
     }
     fprintf(stdout, "<h2>%s</h2>\n", _("SYNOPSIS"));
     fprintf(stdout, "<h2>%s</h2>\n", _("SYNOPSIS"));
     fprintf(stdout, "<div id=\"name\"><b>%s</b><br></div>\n", st->pgm_name);
     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);
     fprintf(stdout, "<div id=\"synopsis\"><b>%s</b>", st->pgm_name);
 
 

+ 1 - 1
lib/gis/parser_rest.c

@@ -77,7 +77,7 @@ void G__usage_rest(void)
     }
     }
     fprintf(stdout, "\n%s\n----------------------\n", _("SYNOPSIS"));
     fprintf(stdout, "\n%s\n----------------------\n", _("SYNOPSIS"));
     fprintf(stdout, "**%s**\n\n", st->pgm_name);
     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);
     fprintf(stdout, "**%s**", st->pgm_name);