summaryrefslogtreecommitdiff
path: root/example/simple-ex.zig
diff options
context:
space:
mode:
authorGravatar Jimmi Holst Christensen2024-07-18 16:56:11 +0200
committerGravatar Jimmi Holst Christensen2024-07-18 17:12:40 +0200
commit2998679eb1a5d75c5c1043c0fc8470eb9c946b70 (patch)
tree3768dd0d4f18871161646493bc18260e1f2786a4 /example/simple-ex.zig
parentUpdate to newest version of zig (diff)
downloadzig-clap-2998679eb1a5d75c5c1043c0fc8470eb9c946b70.tar.gz
zig-clap-2998679eb1a5d75c5c1043c0fc8470eb9c946b70.tar.xz
zig-clap-2998679eb1a5d75c5c1043c0fc8470eb9c946b70.zip
feat: Allow for the assignment separator to be configured131-assignment-separators
Diffstat (limited to 'example/simple-ex.zig')
-rw-r--r--example/simple-ex.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/example/simple-ex.zig b/example/simple-ex.zig
index 436d058..2943f4e 100644
--- a/example/simple-ex.zig
+++ b/example/simple-ex.zig
@@ -34,6 +34,9 @@ pub fn main() !void {
34 var res = clap.parse(clap.Help, &params, parsers, .{ 34 var res = clap.parse(clap.Help, &params, parsers, .{
35 .diagnostic = &diag, 35 .diagnostic = &diag,
36 .allocator = gpa.allocator(), 36 .allocator = gpa.allocator(),
37 // The assignment separator can be configured. `--number=1` and `--number:1` is now
38 // allowed.
39 .assignment_separators = "=:",
37 }) catch |err| { 40 }) catch |err| {
38 diag.report(io.getStdErr().writer(), err) catch {}; 41 diag.report(io.getStdErr().writer(), err) catch {};
39 return err; 42 return err;