summaryrefslogtreecommitdiff
path: root/example/help.zig
diff options
context:
space:
mode:
Diffstat (limited to 'example/help.zig')
-rw-r--r--example/help.zig14
1 files changed, 4 insertions, 10 deletions
diff --git a/example/help.zig b/example/help.zig
index 35c0258..de8a55a 100644
--- a/example/help.zig
+++ b/example/help.zig
@@ -7,19 +7,13 @@ pub fn main() !void {
7 const stderr = &stderr_out_stream.stream; 7 const stderr = &stderr_out_stream.stream;
8 8
9 // clap.help is a function that can print a simple help message, given a 9 // clap.help is a function that can print a simple help message, given a
10 // slice of Param([]const u8). There is also a helpEx, which can print a 10 // slice of Param(Help). There is also a helpEx, which can print a
11 // help message for any Param, but it is more verbose to call. 11 // help message for any Param, but it is more verbose to call.
12 try clap.help( 12 try clap.help(
13 stderr, 13 stderr,
14 [_]clap.Param([]const u8){ 14 comptime [_]clap.Param(clap.Help){
15 clap.Param([]const u8){ 15 clap.parseParam("-h, --help Display this help and exit. ") catch unreachable,
16 .id = "Display this help and exit.", 16 clap.parseParam("-v, --version Output version information and exit.") catch unreachable,
17 .names = clap.Names{ .short = 'h', .long = "help" },
18 },
19 clap.Param([]const u8){
20 .id = "Output version information and exit.",
21 .names = clap.Names{ .short = 'v', .long = "version" },
22 },
23 }, 17 },
24 ); 18 );
25} 19}