aboutsummaryrefslogtreecommitdiff
path: root/src/compile/cli.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-22 18:17:03 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-22 18:17:03 -0500
commit354605f56937e6f51695084d208521f7f2df890c (patch)
tree4edb80e84468696d55fa4ae3ce89707aa018e087 /src/compile/cli.c
parent903c957c7e686401e12bf52ad0ac00d0efa6fd30 (diff)
Fix for CLI usage showing flag type instead of flag name for positional
args
Diffstat (limited to 'src/compile/cli.c')
-rw-r--r--src/compile/cli.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/compile/cli.c b/src/compile/cli.c
index 63a467ca..ade6caa7 100644
--- a/src/compile/cli.c
+++ b/src/compile/cli.c
@@ -83,10 +83,8 @@ static Text_t generate_usage(env_t *env, type_t *fn_type) {
else if (t->tag == ListType) usage = Texts(usage, "[", flags, " ", get_flag_options(t, Text("|")), "]");
else if (t->tag == EnumType) usage = Texts(usage, "[", flags, " val]");
else usage = Texts(usage, "[", flags, " ", get_flag_options(t, Text("|")), "]");
- } else if (t->tag == EnumType) {
- usage = Texts(usage, "\x1b[1m", flag, "\x1b[m");
} else {
- usage = Texts(usage, "\x1b[1m", get_flag_options(t, Text("|")), "\x1b[m");
+ usage = Texts(usage, "\x1b[1m", flag, "\x1b[m");
}
}
return usage;