/** * Emits shell completion scripts for the `crew` CLI. The command tree is * declared once in `COMPLETION_SPEC` below and rendered into bash, zsh, and * fish scripts. Keep the spec in sync with the parsers in this directory; the * `completions.test.ts` drift guard asserts the top-level command names match * the visible entries in `SUBCOMMANDS` (see `../cli.ts`). */ /** Describes the value a flag consumes, driving per-shell value completion. */ type CompletionArg = { readonly kind: "enum"; readonly values: readonly string[]; } | { readonly kind: "file"; } | { readonly kind: "dir"; } | { readonly kind: "string"; }; interface CompletionOption { readonly name: string; readonly short?: string; readonly summary: string; /** Omitted for boolean flags; present when the flag takes a value. */ readonly arg?: CompletionArg; } export interface CompletionCommand { readonly name: string; readonly summary: string; readonly options?: readonly CompletionOption[]; readonly subcommands?: readonly CompletionCommand[]; /** Static positional values (e.g. `crew completions `). */ readonly argValues?: readonly string[]; } export declare const SUPPORTED_SHELLS: readonly ["bash", "zsh", "fish"]; export type SupportedShell = (typeof SUPPORTED_SHELLS)[number]; /** * The single source of truth for shell completions. Ordering mirrors * `crew --help`; hidden and deprecated commands are intentionally excluded. */ export declare const COMPLETION_SPEC: readonly CompletionCommand[]; /** Renders the completion script for a supported shell. */ export declare function generateCompletionScript(shell: SupportedShell): string; export declare function completionsCli(argv: string[]): Promise; export {}; //# sourceMappingURL=completions.d.ts.map