blob: 2775177fe711f1594b4b866de08927d654e86eaf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
const std = @import("std");
const clap = @import("clap");
pub fn main() !void {
const stderr_file = std.io.getStdErr();
var stderr_out_stream = stderr_file.outStream();
// 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.
try clap.help(
stderr_out_stream,
comptime &[_]clap.Param(clap.Help){
clap.parseParam("-h, --help Display this help and exit. ") catch unreachable,
clap.parseParam("-v, --version Output version information and exit.") catch unreachable,
},
);
}
|