We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27aeac1 commit 03f7d38Copy full SHA for 03f7d38
Readme.md
@@ -65,6 +65,18 @@ if (program.sauce) console.log(' with sauce');
65
else console.log(' without sauce');
66
```
67
68
+To get string arguments from options you will need to use angle brackets <> for required inputs <br>
69
+or square brackets [] for optional inputs.
70
+
71
+e.g. ```.option(' -m --myarg [myVar]', 'my super cool description')```<br>
72
73
+Then to access the input if it was passed in.
74
75
+e.g. ```var myInput = program.myarg```
76
77
+**NOTE**: If you pass a argument without using brackets the example above will return true and not the value passed in.
78
79
80
## Version option
81
82
Calling the `version` implicitly adds the `-V` and `--version` options to the command.
0 commit comments