CompletionRegistrationOptions
Options for CLIBuilder.completions: the generator options plus where the built-in completion is exposed.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/cli/index.ts - Source link:
src/core/cli/index.ts:291
Signatures
ts
interface CompletionRegistrationOptions extends CompletionOptions {}Members
Properties
as
Where the built-in shell completion is exposed.
'command'registers acompletionssubcommand (the default).'flag'exposes an eager--completions <shell>flag on the CLI root instead, keeping the root free of acompletionssubcommand.
ts
as?: "flag" | "command";functionPrefix
Override the generated shell function name prefix.
Defaults to the CLI name from the schema. This is mainly useful when embedding multiple generated scripts in the same environment and you want deterministic, collision-free helper names.
ts
functionPrefix?: string;rootMode
Controls which root-level surface shell completion exposes when a default command exists.
'subcommands'keeps hybrid CLIs command-centric at the root while still exposing default-command flags for a single visible default command.'surface'exposes the default command's root-usable flags at the root whenever a visible default command exists.
ts
rootMode?: "surface" | "subcommands";