Skip to content

Commit

Permalink
Implemented Help Categories & Fixed Usage/Help f/ Options
Browse files Browse the repository at this point in the history
- Added `help_category_order` to `Command.Config` to allow library users to change the order in which help message categories are written.
- Added the `HelpCategory` enum to support the `help_category_order`.
- Fixed small comptime error f/ Usage/Help functions in Options.
  • Loading branch information
00JCIV00 committed Aug 28, 2024
1 parent 9b0e6b0 commit b6dc0cc
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 142 deletions.
1 change: 1 addition & 0 deletions examples/covademo.zig
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const conf_optimized = Command.Config.optimized(.{});
pub const CommandT = Command.Custom(.{
.global_help_prefix = "CovaDemo",
.global_vals_mandatory = false,
.help_category_order = &.{ .Prefix, .Header, .Aliases, .Values, .Options, .Commands },
//.allow_arg_indices = false,
.global_usage_fn = struct{
fn usage(self: anytype, writer: anytype, _: ?mem.Allocator) !void {
Expand Down
Loading

0 comments on commit b6dc0cc

Please sign in to comment.