Skip to content

Commit

Permalink
docs: update example command
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesrocket committed Aug 23, 2024
1 parent e880aa5 commit 11b9829
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ zig build
## Usage

```sh
xtxf -d -p -c red -s crypto
xtxf -p -m decimal -c red -s crypto
```
6 changes: 3 additions & 3 deletions src/assets.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ pub const help_message =
\\ ██░██ ░██ ██ ██ ░██
\\ ██ ██ ██ ██ ░██ ██
\\
\\{s}COMMAND: {s}
\\
\\{s}DESCRIPTION: {s}
\\{s}{s}
\\{s}{s}
\\
\\
;

pub const opt_usage = "{u}{?u}{s} {s}{s?} <{s}:{s}>";
pub const examples_header = "{s}EXAMPLE:\n";
5 changes: 4 additions & 1 deletion src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const Color = enum(u32) { default = tb.TB_DEFAULT, red = tb.TB_RED, green = tb.T
pub const CommandT = cova.Command.Custom(.{
.global_help_prefix = "xtxf-" ++ build_opt.head_hash[0..7],
.help_header_fmt = assets.help_message,
.examples_header_fmt = assets.examples_header,
.opt_config = .{
.usage_fmt = assets.opt_usage,
},
Expand Down Expand Up @@ -101,7 +102,9 @@ const ValueT = CommandT.ValueT;
pub const setup_cmd: CommandT = .{
.name = "xtxf",
.description = "Binary matrix.",

.examples = &.{
"xtxf -p -m decimal -c red -s crypto",
},
.opts = &.{
.{
.name = "color",
Expand Down

0 comments on commit 11b9829

Please sign in to comment.