From 26c5a6c1dd765f2a73ad215c68cd2457849f27e5 Mon Sep 17 00:00:00 2001 From: Sai Karthik <11899221+kskarthik@users.noreply.github.com> Date: Mon, 12 Jan 2026 22:39:59 +0530 Subject: [PATCH] fix(cli): incorrect bin name in shell completions (#6444) Signed-off-by: Sai Karthik --- crates/goose-cli/src/cli.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/goose-cli/src/cli.rs b/crates/goose-cli/src/cli.rs index 643f9277..62d1e55e 100644 --- a/crates/goose-cli/src/cli.rs +++ b/crates/goose-cli/src/cli.rs @@ -854,6 +854,9 @@ enum Command { Completion { #[arg(value_enum)] shell: ClapShell, + + #[arg(long, default_value = "goose", help = "Provide a custom binary name")] + bin_name: String, }, } @@ -1438,9 +1441,8 @@ pub async fn cli() -> anyhow::Result<()> { ); match cli.command { - Some(Command::Completion { shell }) => { + Some(Command::Completion { shell, bin_name }) => { let mut cmd = Cli::command(); - let bin_name = cmd.get_name().to_string(); generate(shell, &mut cmd, bin_name, &mut std::io::stdout()); Ok(()) }