Shell completions
Teams CLI uses Cobra, so you can generate shell completions with the built-in command.
Bash completion
- Generate completion script
- Install system-wide (recommended)
- Or install user-only
mkdir -p ~/.local/share/bash-completion/completions
cp teams-cli-completion.bash ~/.local/share/bash-completion/completions/teams-cli
- Reload your shell
Zsh completion
- Generate completion script
- Install in Zsh function path
sudo mkdir -p /usr/local/share/zsh/site-functions
sudo cp _teams-cli /usr/local/share/zsh/site-functions/
- Or install user-only
mkdir -p ~/.zsh/completions
cp _teams-cli ~/.zsh/completions/
echo 'fpath=(~/.zsh/completions $fpath)' >> ~/.zshrc
echo 'autoload -U compinit && compinit' >> ~/.zshrc
- Reload your shell
Fish completion
- Generate and install completion
- Reload Fish configuration
PowerShell completion
- Generate completion script
- Create PowerShell profile directory
- Add to PowerShell profile
- Reload PowerShell