> ## Documentation Index
> Fetch the complete documentation index at: https://jetemail.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# completion

> Generate shell tab-completion scripts for jetemail.

`jetemail completion <shell>` prints a tab-completion script to stdout. Set it up once and your shell will autocomplete `jetemail` subcommands and flags when you press Tab.

```sh theme={null}
jetemail completion <bash|zsh|fish|powershell|elvish>
```

## zsh

```sh theme={null}
jetemail completion zsh > ~/.zsh/completions/_jetemail
```

Then in your `~/.zshrc`:

```sh theme={null}
fpath=(~/.zsh/completions $fpath)
autoload -U compinit && compinit
```

## bash

```sh theme={null}
jetemail completion bash > /usr/local/etc/bash_completion.d/jetemail
```

On Linux you may want `/etc/bash_completion.d/jetemail` (requires sudo), or source it from `~/.bashrc`:

```sh theme={null}
jetemail completion bash > ~/.local/share/bash-completion/completions/jetemail
```

## fish

```sh theme={null}
jetemail completion fish > ~/.config/fish/completions/jetemail.fish
```

## powershell

```powershell theme={null}
jetemail completion powershell >> $PROFILE
```

Restart your shell (or `. $PROFILE`) for the new completions to load.

## elvish

```sh theme={null}
jetemail completion elvish > ~/.config/elvish/lib/jetemail-completion.elv
```

Then `use jetemail-completion` from your `rc.elv`.

## What you get

Tab completion covers:

* Top-level subcommands (`email`, `inbound`, `outbound`, `webhooks`, …)
* Nested subcommands (`outbound smarthost update …`)
* Long flags on each command (`--from`, `--to`, `--idempotency-key`, …)
* Enum values where they apply (e.g. shell names for `completion`)
