import type { Command, Option } from 'commander'; /** * Set argChoices on an option without enabling Commander's built-in * validation. The choices are surfaced for shell completions but the * option still accepts any value at parse time. */ export declare function withUnvalidatedChoices(opt: Option, values: string[]): Option; export declare function withCaseInsensitiveChoices(opt: Option, values: string[]): Option; /** * Parse COMP_LINE into words, stripping the binary name and the * 'completion-server' token that tabtab injects. * * FIXME: This splits on whitespace and does not handle quoted arguments. * This is acceptable for command/flag traversal. It can be improved once * tabtab exposes shell-provided tokenized words. */ export declare function parseCompLine(compLine: string): string[]; export interface CompletionItem { name: string; description?: string; } /** * Get completions for the current command line context. * * @param program - The root Commander program with all commands registered * @param words - The words on the command line (excluding the binary name) * @param current - The current word being typed (may be empty string) * @returns Array of completion items */ export declare function getCompletions(program: Command, words: string[], current: string): CompletionItem[]; //# sourceMappingURL=completion.d.ts.map