From 76797569e17a3ae53bfeb5b41339905e5002536b Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Fri, 20 Feb 2026 18:55:24 -0800 Subject: [PATCH] Hide `rm` alias from help while keeping it in completions --- src/cli.ts | 2 +- src/commands/completions.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 83ff97d..460d14b 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -82,7 +82,7 @@ program .action((branch: string, opts: { force?: boolean }) => closeAction(branch, opts)) program - .command("rm") + .command("rm", { hidden: true }) .argument("", "branch name") .option("-f, --force", "close even if there are unsaved changes") .description("Remove a session (alias for close)") diff --git a/src/commands/completions.ts b/src/commands/completions.ts index 81250f3..c597be7 100644 --- a/src/commands/completions.ts +++ b/src/commands/completions.ts @@ -17,7 +17,6 @@ export function action(program: Command) { const branchCommands: string[] = [] for (const cmd of program.commands) { - if ((cmd as any)._hidden) continue const name = cmd.name() const desc = cmd.description() const subs = cmd.commands as Command[]