feat: add completion subcommand to generate shell completion scripts for Zsh, Bash, PowerShell, and Fish.
This commit is contained in:
@@ -227,8 +227,20 @@ const entries: SubCliEntry[] = [
|
||||
mod.registerUpdateCli(program);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "completion",
|
||||
description: "Generate shell completion script",
|
||||
register: async (program) => {
|
||||
const mod = await import("../completion-cli.js");
|
||||
mod.registerCompletionCli(program);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export function getSubCliEntries(): SubCliEntry[] {
|
||||
return entries;
|
||||
}
|
||||
|
||||
function removeCommand(program: Command, command: Command) {
|
||||
const commands = program.commands as Command[];
|
||||
const index = commands.indexOf(command);
|
||||
|
||||
Reference in New Issue
Block a user