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

# completion

Generate shell completion information for 1Password CLI.

```shell theme={null}
op completion <shell> [flags]
```

If you use Bash, Zsh, fish, or PowerShell, you can add shell completion for 1Password CLI.
With completions loaded, after you start typing a command,
press Tab to see available commands and options.

#### Load shell completion information for Bash

To always load the completion information for Bash, add this to your
`.bashrc` file:

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

To use shell completion in Bash, you’ll need the `bash-completion` package.

#### Load shell completion information for Zsh

To always load the completion information for Zsh, add this to your
`.zshrc` file:

```shell theme={null}
eval "$(op completion zsh)"; compdef _op op
```

#### Load shell completion information for fish

To always load the completion information for fish, add this to your
`.fish` file:

```shell theme={null}
op completion fish | source
```

#### Load shell completion information for PowerShell

To always load the completion information for PowerShell, add this
to your `.ps1` file:

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

<Note>
  To use shell completion in PowerShell, you need to enable
  execution of scripts. To do that, start a PowerShell window as
  administrator and run the following command:
</Note>

```powershell theme={null}
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
```
