Skip to main content
The tkn pac completion command generates shell completion scripts that enable tab completion for tkn-pac commands, subcommands, and flags.

Usage

tkn pac completion SHELL

Supported Shells

  • bash
  • zsh
  • fish
  • powershell

Installation

Bash

1

Generate completion script

tkn pac completion bash > /tmp/tkn-pac-completion.bash
2

Source the script

Add to your ~/.bashrc:
source /tmp/tkn-pac-completion.bash
Or install system-wide:
sudo cp /tmp/tkn-pac-completion.bash /etc/bash_completion.d/tkn-pac
3

Reload your shell

source ~/.bashrc

Zsh

1

Generate completion script

tkn pac completion zsh > "${fpath[1]}/_tkn-pac"
2

Enable completion

Add to your ~/.zshrc if not already present:
autoload -U compinit
compinit
3

Reload your shell

source ~/.zshrc
For oh-my-zsh, you may need to reload the completion cache:
rm ~/.zcompdump*
compinit

Fish

1

Generate completion script

tkn pac completion fish > ~/.config/fish/completions/tkn-pac.fish
2

Reload fish

Start a new fish shell or run:
source ~/.config/fish/config.fish

PowerShell

1

Generate completion script

tkn pac completion powershell > tkn-pac.ps1
2

Source the script

Add to your PowerShell profile:
. .\tkn-pac.ps1

Examples

Bash with Homebrew

If you installed tkn-pac via Homebrew on macOS:
tkn pac completion bash > $(brew --prefix)/etc/bash_completion.d/tkn-pac

Zsh with Oh-My-Zsh

mkdir -p ~/.oh-my-zsh/custom/completions
tkn pac completion zsh > ~/.oh-my-zsh/custom/completions/_tkn-pac

Test Completion

After installing, test completion by typing:
tkn pac <TAB>
You should see available subcommands:
bootstrap  create  describe  generate  logs  repository  resolve  version  webhook

What Gets Completed

Shell completion provides suggestions for:
  • Commands: bootstrap, create, generate, etc.
  • Subcommands: repository list, repository delete, webhook add
  • Flags: --namespace, --repository, --last
  • Flag values: Git providers, event types (where applicable)

Troubleshooting

Make sure you’ve reloaded your shell configuration:
# Bash
source ~/.bashrc

# Zsh
source ~/.zshrc

# Fish - start a new shell
exec fish
Install bash-completion:
# macOS
brew install bash-completion@2

# Ubuntu/Debian
sudo apt-get install bash-completion

# RHEL/CentOS
sudo yum install bash-completion
Check that completion is enabled in your ~/.zshrc:
autoload -U compinit
compinit
If using oh-my-zsh, verify the completions directory is in your fpath.

See Also

Build docs developers (and LLMs) love