fix(cli): add completion command to commands array for help --all and cli-reference

The shell-completion entrypoint was registered via .completion() in index.ts
but missing from the commands array used by generateHelp(). This meant
kilo help --all and cli-reference.md never included it.

Add a synthetic CommandModule entry for completion to commands.ts and remove
the now-redundant manual row in generateCommandTable().
This commit is contained in:
Mark IJbema
2026-04-07 19:01:30 +02:00
parent a03a572d20
commit 6690370fa1
2 changed files with 9 additions and 5 deletions
@@ -24,6 +24,14 @@ import { RemoteCommand } from "../cli/cmd/remote"
import { DbCommand } from "../cli/cmd/db"
import { HelpCommand } from "./help-command"
// Synthetic entry for the yargs built-in .completion() command so that
// generateHelp --all and cli-reference.md include it automatically.
const CompletionCommand: CommandModule<any, any> = {
command: "completion",
describe: "generate shell completion script",
handler: () => {},
}
export const commands: CommandModule<any, any>[] = [
AcpCommand,
McpCommand,
@@ -46,4 +54,5 @@ export const commands: CommandModule<any, any>[] = [
RemoteCommand,
DbCommand,
HelpCommand,
CompletionCommand,
]
-5
View File
@@ -227,11 +227,6 @@ export async function generateCommandTable(options?: { commands?: Cmd[] }) {
})
}
rows.push({
display: "kilo completion",
description: "generate shell completion script",
})
const lines = ["| Command | Description |", "| --- | --- |"]
for (const row of rows) {