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

# aether completion

> Generate shell completion scripts

# aether completion

Generate shell completion scripts for tab completion of commands, subcommands, and flags.

## Usage

```bash theme={null}
aether completion [bash|zsh|fish|powershell]
```

## Shells

| Shell        | Description                  |
| ------------ | ---------------------------- |
| `bash`       | Bash completion script       |
| `zsh`        | Zsh completion script        |
| `fish`       | Fish completion script       |
| `powershell` | PowerShell completion script |

## Setup

<Tabs>
  <Tab title="Bash">
    Load completions in the current session:

    ```bash theme={null}
    source <(aether completion bash)
    ```

    Persist across sessions by adding to `~/.bashrc`:

    ```bash theme={null}
    echo 'source <(aether completion bash)' >> ~/.bashrc
    ```

    On macOS with Homebrew bash-completion:

    ```bash theme={null}
    aether completion bash > "$(brew --prefix)/etc/bash_completion.d/aether"
    ```
  </Tab>

  <Tab title="Zsh">
    Generate the completion file:

    ```bash theme={null}
    aether completion zsh > "${fpath[1]}/_aether"
    ```

    If `$fpath[1]` is not writable, create a custom completions directory:

    ```bash theme={null}
    mkdir -p ~/.zsh/completions
    aether completion zsh > ~/.zsh/completions/_aether
    ```

    Add the directory to your `fpath` in `~/.zshrc`:

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

    Restart your shell or run `compinit` to load the completions.
  </Tab>

  <Tab title="Fish">
    Load completions in the current session:

    ```bash theme={null}
    aether completion fish | source
    ```

    Persist across sessions:

    ```bash theme={null}
    aether completion fish > ~/.config/fish/completions/aether.fish
    ```
  </Tab>

  <Tab title="PowerShell">
    Load completions in the current session:

    ```powershell theme={null}
    aether completion powershell | Out-String | Invoke-Expression
    ```

    Persist by adding to your PowerShell profile (`$PROFILE`):

    ```powershell theme={null}
    aether completion powershell >> $PROFILE
    ```
  </Tab>
</Tabs>

## Examples

```bash theme={null}
# Generate and inspect the bash completion script
aether completion bash

# Pipe directly to a file
aether completion zsh > /usr/local/share/zsh/site-functions/_aether

# Verify completions are working (type and press Tab)
aether pr<TAB>
# completes to: aether project
```
