You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-5Lines changed: 43 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ Single value:
92
92
93
93
There can be as many argument variants as liked, usually the short and long version e.g `-f` and `--foo`.
94
94
95
-
Argengine doesn't care about the naming of the options and they can be anything: `-f`, `a`, `/c`, `foo`, `--foo`..
95
+
`Argengine` doesn't care about the naming of the options and they can be anything: `-f`, `a`, `/c`, `foo`, `--foo` ...
96
96
97
97
Positional arguments (for example a file name for a text editor after other options) can be received with a single callback:
98
98
@@ -110,14 +110,52 @@ Positional arguments (for example a file name for a text editor after other opti
110
110
111
111
If callback for positional arguments is set, then no errors about `unknown options` will occur as all additional options will be taken as positional arguments.
112
112
113
+
# Help
114
+
115
+
By default, `Argengine` will create a simple help that is shown with `-h` or `--help`.
116
+
117
+
Without any additional options possible output will look like this:
118
+
119
+
```
120
+
Usage: ./ex1 [OPTIONS]
121
+
122
+
Options:
123
+
124
+
-h, --help Show this help.
125
+
```
126
+
127
+
The help can be manually printed with `Argengine::printHelp()`.
128
+
129
+
The default help can be disabled by constructing `Argengine` with `Argengine::Argengine(argc, argv, false)`.
0 commit comments