# burgee/completions

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

Source: https://burgee.interlace.tools/docs/api/completions

<!-- Generated by scripts/api-reference.ts from the built dist/*.d.ts. Do not edit; run `npx tsx scripts/api-reference.ts`. -->

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).

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

## Functions

### completionTree

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

```ts
function completionTree(manifest: Manifest): {
    program: string;
    root: Node;
};
```

| Parameter | Type |
| :-- | :-- |
| `manifest` | `Manifest` |

**Returns** `{ program: string; root: Node; }`

### renderCompletion

```ts
function renderCompletion(manifest: Manifest, shell: Shell): string;
```

| Parameter | Type |
| :-- | :-- |
| `manifest` | `Manifest` |
| `shell` | `Shell` |

**Returns** `string`

### renderFigSpec

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

```ts
function renderFigSpec(manifest: Manifest): FigSubcommand;
```

| Parameter | Type |
| :-- | :-- |
| `manifest` | `Manifest` |

**Returns** `FigSubcommand`

## Constants

### SHELLS

```ts
const SHELLS: readonly Shell[];
```

## Types

### Shell

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