burgee
API reference

burgee/completions

Every export of burgee/completions, with its signature and doc comment: completionTree, renderFigSpec, renderCompletion, SHELLS, plus 1 type.

Completions, generated statically from the manifest (D2): bash, zsh, fish and PowerShell scripts that never run Node on TAB (D3), plus a Fig spec from the same walk (D5). Every script is deterministic for a manifest, so a snapshot pins it and the shell itself exercises it in CI (D4).

import { completionTree, renderFigSpec, renderCompletion, … } from 'burgee/completions';

Functions

completionTree

The tree the templates walk; the root's own name is the program name.

function completionTree(manifest: Manifest): {
    program: string;
    root: Node;
};
ParameterType
manifestManifest

Returns { program: string; root: Node; }

renderCompletion

function renderCompletion(manifest: Manifest, shell: Shell): string;
ParameterType
manifestManifest
shellShell

Returns string

renderFigSpec

A Fig spec (Fig.Spec) from the same walk (D5): one entry per node, children attached by path.

function renderFigSpec(manifest: Manifest): FigSubcommand;
ParameterType
manifestManifest

Returns FigSubcommand

Constants

SHELLS

const SHELLS: readonly Shell[];

Types

Shell

type Shell = 'bash' | 'zsh' | 'fish' | 'pwsh';

On this page