Hide rm alias from help while keeping it in completions
This commit is contained in:
parent
37665aac58
commit
76797569e1
|
|
@ -82,7 +82,7 @@ program
|
||||||
.action((branch: string, opts: { force?: boolean }) => closeAction(branch, opts))
|
.action((branch: string, opts: { force?: boolean }) => closeAction(branch, opts))
|
||||||
|
|
||||||
program
|
program
|
||||||
.command("rm")
|
.command("rm", { hidden: true })
|
||||||
.argument("<branch>", "branch name")
|
.argument("<branch>", "branch name")
|
||||||
.option("-f, --force", "close even if there are unsaved changes")
|
.option("-f, --force", "close even if there are unsaved changes")
|
||||||
.description("Remove a session (alias for close)")
|
.description("Remove a session (alias for close)")
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ export function action(program: Command) {
|
||||||
const branchCommands: string[] = []
|
const branchCommands: string[] = []
|
||||||
|
|
||||||
for (const cmd of program.commands) {
|
for (const cmd of program.commands) {
|
||||||
if ((cmd as any)._hidden) continue
|
|
||||||
const name = cmd.name()
|
const name = cmd.name()
|
||||||
const desc = cmd.description()
|
const desc = cmd.description()
|
||||||
const subs = cmd.commands as Command[]
|
const subs = cmd.commands as Command[]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user