summaryrefslogtreecommitdiff
path: root/clap.zig
diff options
context:
space:
mode:
authorGravatar Jimmi Holst Christensen2023-01-12 19:49:56 +0100
committerGravatar Jimmi Holst Christensen2023-01-12 19:49:56 +0100
commit6c9ca9025199b145c42a75d10cadb3f97879ee6d (patch)
treeb0095a72a1b087c7319a114f8b8b70f0521c933f /clap.zig
parentyear++ (diff)
downloadzig-clap-6c9ca9025199b145c42a75d10cadb3f97879ee6d.tar.gz
zig-clap-6c9ca9025199b145c42a75d10cadb3f97879ee6d.tar.xz
zig-clap-6c9ca9025199b145c42a75d10cadb3f97879ee6d.zip
Fix misspelled things
Diffstat (limited to 'clap.zig')
-rw-r--r--clap.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/clap.zig b/clap.zig
index f16a97c..ddc3152 100644
--- a/clap.zig
+++ b/clap.zig
@@ -79,7 +79,7 @@ pub const Values = enum {
79/// * "-abc=value" 79/// * "-abc=value"
80/// * "-abcvalue" 80/// * "-abcvalue"
81/// * Long ("--long-param"): Should be used for less common parameters, or when no single 81/// * Long ("--long-param"): Should be used for less common parameters, or when no single
82/// character can describe the paramter. 82/// character can describe the parameter.
83/// * They can take a value two different ways. 83/// * They can take a value two different ways.
84/// * "--long-param value" 84/// * "--long-param value"
85/// * "--long-param=value" 85/// * "--long-param=value"
@@ -722,7 +722,7 @@ pub fn Result(
722/// `T` can be any type and `Error` can be any error. You can pass `clap.parsers.default` if you 722/// `T` can be any type and `Error` can be any error. You can pass `clap.parsers.default` if you
723/// just wonna get something up and running. 723/// just wonna get something up and running.
724/// 724///
725/// Caller ownes the result and should free it by calling `result.deinit()` 725/// Caller owns the result and should free it by calling `result.deinit()`
726pub fn parseEx( 726pub fn parseEx(
727 comptime Id: type, 727 comptime Id: type,
728 comptime params: []const Param(Id), 728 comptime params: []const Param(Id),
@@ -744,7 +744,7 @@ pub fn parseEx(
744 }; 744 };
745 while (try stream.next()) |arg| { 745 while (try stream.next()) |arg| {
746 // TODO: We cannot use `try` inside the inline for because of a compiler bug that 746 // TODO: We cannot use `try` inside the inline for because of a compiler bug that
747 // generates an infinit loop. For now, use a variable to store the error 747 // generates an infinite loop. For now, use a variable to store the error
748 // and use `try` outside. The downside of this is that we have to use 748 // and use `try` outside. The downside of this is that we have to use
749 // `anyerror` :( 749 // `anyerror` :(
750 var res: anyerror!void = {}; 750 var res: anyerror!void = {};
@@ -895,7 +895,7 @@ const MultiArgKind = enum { slice, list };
895 895
896/// Turn a list of parameters into a struct with one field for each none positional parameter. 896/// Turn a list of parameters into a struct with one field for each none positional parameter.
897/// The type of each parameter field is determined by `ParamType`. Positional arguments will not 897/// The type of each parameter field is determined by `ParamType`. Positional arguments will not
898/// havea field in this struct. 898/// have a field in this struct.
899fn Arguments( 899fn Arguments(
900 comptime Id: type, 900 comptime Id: type,
901 comptime params: []const Param(Id), 901 comptime params: []const Param(Id),
@@ -1045,11 +1045,11 @@ pub const Help = struct {
1045 1045
1046pub const HelpOptions = struct { 1046pub const HelpOptions = struct {
1047 /// Render the description of a parameter in a simular way to how markdown would render 1047 /// Render the description of a parameter in a simular way to how markdown would render
1048 /// such a string. This means that single newlines wont be respected unless followed by 1048 /// such a string. This means that single newlines won't be respected unless followed by
1049 /// bullet points or other markdown elements. 1049 /// bullet points or other markdown elements.
1050 markdown_lite: bool = true, 1050 markdown_lite: bool = true,
1051 1051
1052 /// Wether `help` should print the description of a parameter on a new line instead of after 1052 /// Whether `help` should print the description of a parameter on a new line instead of after
1053 /// the parameter names. This options works together with `description_indent` to change 1053 /// the parameter names. This options works together with `description_indent` to change
1054 /// where descriptions are printed. 1054 /// where descriptions are printed.
1055 /// 1055 ///
@@ -1071,7 +1071,7 @@ pub const HelpOptions = struct {
1071 /// changes the output. 1071 /// changes the output.
1072 description_indent: usize = 8, 1072 description_indent: usize = 8,
1073 1073
1074 /// How much to indent each paramter. 1074 /// How much to indent each parameter.
1075 /// 1075 ///
1076 /// indent=0, description_on_new_line=false, description_indent=4 1076 /// indent=0, description_on_new_line=false, description_indent=4
1077 /// 1077 ///
@@ -1088,7 +1088,7 @@ pub const HelpOptions = struct {
1088 indent: usize = 4, 1088 indent: usize = 4,
1089 1089
1090 /// The maximum width of the help message. `help` will try to break the description of 1090 /// The maximum width of the help message. `help` will try to break the description of
1091 /// paramters into multiple lines if they exeed this maximum. Setting this to the width 1091 /// parameters into multiple lines if they exceed this maximum. Setting this to the width
1092 /// of the terminal is a nice way of using this option. 1092 /// of the terminal is a nice way of using this option.
1093 max_width: usize = std.math.maxInt(usize), 1093 max_width: usize = std.math.maxInt(usize),
1094 1094
@@ -1722,7 +1722,7 @@ pub fn usage(stream: anytype, comptime Id: type, params: []const Param(Id)) !voi
1722 1722
1723 const prefix = if (param.names.short) |_| "-" else "--"; 1723 const prefix = if (param.names.short) |_| "-" else "--";
1724 const name = if (param.names.short) |*s| 1724 const name = if (param.names.short) |*s|
1725 // Seems the zig compiler is being a little wierd. I doesn't allow me to write 1725 // Seems the zig compiler is being a little weird. I doesn't allow me to write
1726 // @as(*const [1]u8, s) 1726 // @as(*const [1]u8, s)
1727 @ptrCast([*]const u8, s)[0..1] 1727 @ptrCast([*]const u8, s)[0..1]
1728 else 1728 else