Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: provide instructions for autocomplete #1448

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions docs/tfctl.md
Original file line number Diff line number Diff line change
@@ -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)
```