# Autocompletion

Autocompletion is a convenient command line feature for displaying suggestions when pressing the TAB button.

**PowerShell**

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

```

To test, type `tuna` and press the TAB button several times.

To save settings for future sessions, follow these steps:

1. Open PowerShell as **Administrator** and run the command to allow running custom scripts in the shell:

```powershell
Set-ExecutionPolicy RemoteSigned

```

Answer the question with: A (Yes to All).

2. Open a new PowerShell window as your user and run the commands one by one:

```powershell
if (!(Test-Path -Path $PROFILE.CurrentUserAllHosts)) { New-Item -ItemType File -Path $PROFILE.CurrentUserAllHosts -Force }
Add-Content $PROFILE.CurrentUserAllHosts "tuna completion powershell | Out-String | Invoke-Expression"

```

Or you can edit the file using a text editor:

```shell
notepad $PROFILE.CurrentUserAllHosts

```

Adding the line:

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

```

**Zsh**

```shell
source <(tuna completion zsh)

```

To save settings for future sessions, add to the `~/.zshrc` file:

```shell
if command -v tuna &>/dev/null; then
    eval "$(tuna completion zsh)"
fi

```

**Bash**

```shell
source <(tuna completion bash)

```

To save settings for future sessions, add to the `~/.bashrc` file:

```shell
if command -v tuna &>/dev/null; then
    eval "$(tuna completion bash)"
fi

```

**Fish**

```shell
tuna completion fish | source

```

To save settings for future sessions, add to the `~/.config/fish/completions/tuna.fish` file:

```shell
tuna completion fish

```
