# `jadpo completions`

Turn on Tab completion.

Print the script that makes Tab complete jadpo's commands, flags and values, each with a one-line description. Load it from your shell's start-up file.

Also: `jadpo completion`.

```text
jadpo completions <shell>
```

## Arguments

- `shell`: The shell to complete in

## On every command

- `--json`: Print data for tools instead of text
- `--help`: Show every flag, with examples
- `--color <when>`: Choose when to use colour

`jadpo completions --json` writes one JSON document to standard output instead of text, with the same exit code. The document has `schemaVersion`, `command` (`"completions"`), `ok`, `data` (what the command produced, `null` when it failed) and `diagnostics` (each error with its `rule`, `reason`, `next` and `help`). A command that needs a terminal refuses `--json` and names the flags that do the same job.

## Examples

```text
# Turn on Tab completion in zsh
echo 'source <(jadpo completions zsh)' >> ~/.zshrc
# Turn on Tab completion in bash
echo 'eval "$(jadpo completions bash)"' >> ~/.bashrc
# Turn on Tab completion in fish
jadpo completions fish > ~/.config/fish/completions/jadpo.fish
```

## Errors

- [`cli.completions_arguments`](../errors/cli.completions_arguments.md): Completions command has invalid arguments
