From ac5f46541ca47d3db9df0fcef3cc61731adaefab Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Wed, 30 Mar 2022 22:04:15 +0200 Subject: Update help and usage examples --- example/help.zig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'example/help.zig') diff --git a/example/help.zig b/example/help.zig index 18d61b9..dd9c9ea 100644 --- a/example/help.zig +++ b/example/help.zig @@ -11,9 +11,10 @@ pub fn main() !void { var res = try clap.parse(clap.Help, ¶ms, clap.parsers.default, .{}); defer res.deinit(); - // clap.help is a function that can print a simple help message, given a - // slice of Param(Help). There is also a helpEx, which can print a - // help message for any Param, but it is more verbose to call. + // `clap.help` is a function that can print a simple help message. It can print any `Param` + // where `Id` has a `describtion` and `value` method (`Param(Help)` is one such parameter). + // The last argument contains options as to how `help` should print those parameters. Using + // `.{}` means the default options. if (res.args.help) return clap.help(std.io.getStdErr().writer(), clap.Help, ¶ms, .{}); } -- cgit v1.2.3