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

# Completion

> Set up shell autocompletion for the Loops CLI.

The `completion` command generates autocompletion scripts for your shell.

## Bash

Requires the `bash-completion` package.

Load for the current session:

```bash theme={"dark"}
source <(loops completion bash)
```

Load for every new session:

```bash theme={"dark"}
# Linux
loops completion bash > /etc/bash_completion.d/loops

# macOS
loops completion bash > $(brew --prefix)/etc/bash_completion.d/loops
```

## Zsh

If shell completion is not already enabled, run once:

```bash theme={"dark"}
echo "autoload -U compinit; compinit" >> ~/.zshrc
```

Load for the current session:

```bash theme={"dark"}
source <(loops completion zsh)
```

Load for every new session:

```bash theme={"dark"}
# Linux
loops completion zsh > "${fpath[1]}/_loops"

# macOS
loops completion zsh > $(brew --prefix)/share/zsh/site-functions/_loops
```

## Fish

Load for the current session:

```bash theme={"dark"}
loops completion fish | source
```

Load for every new session:

```bash theme={"dark"}
loops completion fish > ~/.config/fish/completions/loops.fish
```

## PowerShell

Load for the current session:

```powershell theme={"dark"}
loops completion powershell | Out-String | Invoke-Expression
```

To load for every new session, add the output of the above command to your PowerShell profile.
