# Shell completion


`line completion SHELL` prints a script that completes commands, subcommands,
options, and fixed values such as reactions. It reads no session and makes no
network requests. Generate it again after upgrading.

Bash (save it once, then load it from `~/.bashrc`):

```sh
line completion bash > ~/.line-completion.bash
echo 'source ~/.line-completion.bash' >> ~/.bashrc
```

Zsh (put the file on `fpath` before `compinit` runs in `~/.zshrc`):

```sh
mkdir -p ~/.zfunc
line completion zsh > ~/.zfunc/_line
# In ~/.zshrc, before compinit:  fpath=(~/.zfunc $fpath)
```

Fish:

```sh
line completion fish > ~/.config/fish/completions/line.fish
```

PowerShell (add to your `$PROFILE`):

```powershell
line completion powershell | Out-String | Invoke-Expression
```

Chat names, message IDs, and other account data are never completed, because
that would mean reading your session. Homebrew doesn't install these scripts
yet.


---
Source: https://kongesque.github.io/line-cli/reference/completion/
