generateZshCompletion
Generated reference page for the generateZshCompletion function export.
- Import:
@kjanat/dreamcli - Export kind: function
- Declared in:
src/core/completion/shells/zsh.ts - Source link:
packages/dreamcli/src/core/completion/shells/zsh.ts:48
Signatures
ts
function generateZshCompletion(schema: CLISchema, options?: CompletionOptions): string;| Parameter | Type | Description |
|---|---|---|
schema | CLISchema | The CLI schema. |
options | CompletionOptions | undefined | Optional generator configuration. |
Members
Members
generateZshCompletion
Generate a zsh completion script for the CLI.
Use this when you want a zsh-specific script directly rather than routing through generateCompletion. The generated script is compatible with zsh's normal #compdef / fpath loading flow.
ts
(schema: CLISchema, options?: CompletionOptions): string;Examples
ts
const script = generateZshCompletion(app.schema);
// install with: mycli completions zsh > "${fpath[1]}/_mycli"