Skip to content

Commit

Permalink
Merge pull request #1448 from mloiseleur/docs/autocomplete
Browse files Browse the repository at this point in the history
docs: provide instructions for autocomplete
  • Loading branch information
akselleirv authored Sep 23, 2024
2 parents 867f896 + 56be8dd commit 9f9eacd
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/tfctl.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,41 @@ Flags:
Use "tfctl [command] --help" for more information about a command.
```

## Shell completion

It works the same way as flux CLI:

With **bash**:

```shell
# ~/.bashrc or ~/.profile
command -v tfctl >/dev/null && . <(tfctl completion bash)
```

With **fish**:

```shell
tfctl completion fish > ~/.config/fish/completions/tfctl.fish
```

With **powershell**:

```shell
# Windows

cd "$env:USERPROFILE\Documents\WindowsPowerShell\Modules"
tfctl completion powershell >> tfctl-completion.ps1

# Linux

cd "${XDG_CONFIG_HOME:-"$HOME/.config/"}/powershell/modules"
tfctl completion powershell >> tfctl-completions.ps1
```

With **zsh**:

```shell
# ~/.zshrc or ~/.profile
command -v tfctl >/dev/null && . <(tfctl completion zsh)
```

0 comments on commit 9f9eacd

Please sign in to comment.