pub fn main(init: std.process.Init) !void { const params = comptime clap.parseParamsComptime( \\-h, --help Display this help and exit. \\-v, --version Output version information and exit. \\ ); var res = try clap.parse(clap.Help, ¶ms, clap.parsers.default, init.minimal.args, .{ .allocator = init.gpa }); defer res.deinit(); // `clap.help` is a function that can print a simple help message. It can print any `Param` // where `Id` has a `description` 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 != 0) return clap.helpToFile(init.io, .stderr(), clap.Help, ¶ms, .{}); } const clap = @import("clap"); const std = @import("std");