CompletionOptions
Options for completion script generation.
Passed to individual shell generators alongside the CLI schema.
These options affect the generated script text, not runtime completion behavior after installation.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/completion/shells/shared.ts - Source link:
src/core/completion/shells/shared.ts:44
Signatures
ts
interface 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";