> For the complete documentation index, see [llms.txt](https://manual.dxable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.dxable.com/1password/completion.md).

# completion

1Password CLI のシェル補完情報を生Createします。

```
$ op completion <shell> [flags]
```

Bash、Zsh、fish、または PowerShell を使う場合は、1Password CLI にシェル補完を追加できます。補完が読み込まれたら、コマンドの入力を開始してから Tab キーを押すと、使用可能なコマンドとオプションが表示されます。

**Load shell completion information for Bash**

Bash の補完情報を常に読み込むには、 `.bashrc`ファイルに以下を追加します。

```
$ source <(op completion bash)
```

Bash でシェル補完を使うには、`bash-completion`パッケージが必要です。

**Load shell completion information for Zsh**

Zsh の補完情報を常に読み込むには、 `.zshrc`ファイルに以下を追加します。

```
$ eval "$(op completion zsh)"; compdef _op op
```

**Load shell completion information for fish**

fish の補完情報を常に読み込むには、 `.fish`ファイルに以下を追加します。

```
$ op completion fish | source
```

**Load shell completion information for PowerShell**

PowerShell の補完情報を常に読み込むには、`.ps1`ファイルに以下を追加します。

```
PS C: \> op completion powershell | Out-String | Invoke-Expression
```

{% hint style="info" %}
**注記**&#x20;

PowerShell でシェル補完を使うには、スクリプトの実行を有効にする必要があります。そのためには、管理者として PowerShell ウィンドウを起動し、次のコマンドを実行します。
{% endhint %}

```
PS C: \> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
```
