Skip to content

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.

Signatures

ts
interface CompletionOptions {}

Members

Properties

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";

See Also

Released under the MIT License.