# `Cheer.Completion`
[🔗](https://github.com/joshrotenberg/cheer/blob/v0.2.2/lib/cheer/completion.ex#L1)

Shell completion script generation for bash, zsh, fish, and PowerShell.

Generates completion scripts from the command tree metadata.

## Usage

    # Generate and print to stdout
    Cheer.Completion.generate(MyApp.CLI.Root, :bash, prog: "my-app")
    Cheer.Completion.generate(MyApp.CLI.Root, :zsh, prog: "my-app")
    Cheer.Completion.generate(MyApp.CLI.Root, :fish, prog: "my-app")
    Cheer.Completion.generate(MyApp.CLI.Root, :powershell, prog: "my-app")

# `generate`

```elixir
@spec generate(module(), :bash | :zsh | :fish | :powershell, keyword()) :: String.t()
```

Generate a shell completion script for the given command tree.

Options:
  * `:prog` - program name (required)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
