Index: pkg/args/README.md |
diff --git a/pkg/args/README.md b/pkg/args/README.md |
index fe31554cba93d95e5f433ba50a3ac5a69e93fe6d..329e20c24725461922ddbf460f8a22baf13cacd5 100644 |
--- a/pkg/args/README.md |
+++ b/pkg/args/README.md |
@@ -209,6 +209,11 @@ To define help text for an entire option, use the `help:` parameter: |
allowed: ['debug', 'release']); |
parser.addFlag('verbose', help: 'Show additional diagnostic info'); |
+For non-flag options, you can also provide a help string for the parameter: |
nweiz
2014/07/02 19:41:32
"help string" -> "name"
Bob Nystrom
2014/07/07 20:37:34
I think I like "help string" here. I want people t
nweiz
2014/07/07 20:52:00
Again, I think "help" is strongly tied to prose de
|
+ |
+ parser.addOption('out', help: 'The output path', helpValue: 'path', |
+ allowed: ['debug', 'release']); |
+ |
For non-flag options, you can also provide detailed help for each expected value |
by using the `allowedHelp:` parameter: |
@@ -227,16 +232,12 @@ The resulting string looks something like this: |
--mode The compiler configuration |
[debug, release] |
+ --out=<path> The output path |
--[no-]verbose Show additional diagnostic info |
--arch The architecture to compile for |
- |
[arm] ARM Holding 32-bit chip |
[ia32] Intel x86 |
-To assist the formatting of the usage help, single-line help text is followed by |
-a single new line. Options with multi-line help text are followed by two new |
-lines. This provides spatial diversity between options. |
nweiz
2014/07/02 19:41:32
This change should probably also be mentioned in t
Bob Nystrom
2014/07/07 20:37:34
There's no behavioral change here. I just took the
|
- |
[posix]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02 |
[gnu]: http://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces |
[ArgParser]: https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/args/args.ArgParser |