MCPcopy Create free account
hub / github.com/Noumena-Network/code / generateCompletionScript

Function generateCompletionScript

src/cli/handlers/ant.ts:588–603  ·  view source on GitHub ↗
(
  shell: string,
  program: CommanderCommand,
)

Source from the content-addressed store, hash-verified

586}
587
588function generateCompletionScript(
589 shell: string,
590 program: CommanderCommand,
591): string {
592 const normalized = shell.trim().toLowerCase()
593 if (normalized === 'bash') {
594 return generateBashCompletion(program)
595 }
596 if (normalized === 'zsh') {
597 return generateZshCompletion(program)
598 }
599 if (normalized === 'fish') {
600 return generateFishCompletion(program)
601 }
602 throw new Error(`Unsupported shell "${shell}". Expected bash, zsh, or fish.`)
603}
604
605export async function logHandler(logId?: string | number): Promise<void> {
606 try {

Callers 1

completionHandlerFunction · 0.85

Calls 3

generateBashCompletionFunction · 0.85
generateZshCompletionFunction · 0.85
generateFishCompletionFunction · 0.85

Tested by

no test coverage detected