# axle completion

Complete axle's commands, options and their values with Tab in bash, zsh, fish, PowerShell and Elvish.

```sh
axle completion <shell>
```

`axle completion` prints a script that makes Tab complete Axle's commands, options and the values they take, such as `axle run --output-logs <Tab>`. The shell is `bash`, `zsh`, `fish`, `powershell` or `elvish`. Load the script from your shell's startup file, as below, and open a new terminal.

## bash

Add this line to `~/.bashrc`:

```sh
eval "$(axle completion bash)"
```

## zsh

Add this line to `~/.zshrc`, after `compinit`:

```sh
eval "$(axle completion zsh)"
```

## fish

Write the script into fish's completions folder once:

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

## PowerShell

Add this line to your profile, the file `$PROFILE` names:

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

## Elvish

Add this line to `~/.config/elvish/rc.elv`:

```sh
eval (axle completion elvish | slurp)
```

## Updating

The bash, zsh, PowerShell and Elvish lines run `axle completion` in each new terminal, so they always match the installed Axle. A fish completions file is written once: write it again after updating Axle to complete new commands and options.
