Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

Commit 9a99098

Browse files
eikopfclaude
andauthored
Use kebab-case for flag names in help text (#76)
Help messages were displaying flags with underscores (e.g. `--spec_impl`) while the CLI parser expects kebab-case (e.g. `--spec-impl`). Convert flag names to kebab-case in help output, matching completions and error messages. Fixes #75. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cd1ac16 commit 9a99098

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

crates/figue/src/help.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use crate::missing::normalize_program_name;
77
use crate::schema::{ArgLevelSchema, ArgSchema, Schema, Subcommand};
88
use facet_core::Facet;
9+
use heck::ToKebabCase;
910
use owo_colors::OwoColorize;
1011
use owo_colors::Stream::Stdout;
1112
use std::string::String;
@@ -310,7 +311,7 @@ fn write_arg_help(out: &mut String, arg: &ArgSchema) {
310311
} else {
311312
out.push_str(&format!(
312313
"{}",
313-
format!("--{name}").if_supports_color(Stdout, |text| text.green())
314+
format!("--{}", name.to_kebab_case()).if_supports_color(Stdout, |text| text.green())
314315
));
315316

316317
// Show value placeholder for non-bool, non-counted types

0 commit comments

Comments
 (0)