summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 8 insertions, 4 deletions
diff --git a/README.md b/README.md
index 85d944f..25199e2 100644
--- a/README.md
+++ b/README.md
@@ -200,7 +200,8 @@ is generated at runtime.
200 200
201The `help` prints a simple list of all parameters the program can take. It expects the 201The `help` prints a simple list of all parameters the program can take. It expects the
202`Id` to have a `description` method and an `value` method so that it can provide that 202`Id` to have a `description` method and an `value` method so that it can provide that
203in the output. 203in the output. `HelpOptions` is passed to `help` to control how the help message is
204printed.
204 205
205```zig 206```zig
206const clap = @import("clap"); 207const clap = @import("clap");
@@ -220,15 +221,18 @@ pub fn main() !void {
220 // slice of Param(Help). There is also a helpEx, which can print a 221 // slice of Param(Help). There is also a helpEx, which can print a
221 // help message for any Param, but it is more verbose to call. 222 // help message for any Param, but it is more verbose to call.
222 if (res.args.help) 223 if (res.args.help)
223 return clap.help(std.io.getStdErr().writer(), clap.Help, &params); 224 return clap.help(std.io.getStdErr().writer(), clap.Help, &params, .{});
224} 225}
225 226
226``` 227```
227 228
228``` 229```
229$ zig-out/bin/help --help 230$ zig-out/bin/help --help
230 -h, --help Display this help and exit. 231 -h, --help
231 -v, --version Output version information and exit. 232 Display this help and exit.
233
234 -v, --version
235 Output version information and exit.
232``` 236```
233 237
234### `usage` 238### `usage`