Shell Completions
Shell Completions
Section titled “Shell Completions”atlcli provides tab completion support for Bash and Zsh shells. Completions work for commands, subcommands, flags, and plugin commands.
Prerequisites
Section titled “Prerequisites”- Bash or Zsh shell
- atlcli installed and in PATH
Quick Setup
Section titled “Quick Setup”Add to your ~/.zshrc:
eval "$(atlcli completion zsh)"Or append the script permanently:
atlcli completion zsh >> ~/.zshrcsource ~/.zshrcAdd to your ~/.bashrc:
eval "$(atlcli completion bash)"Or append the script permanently:
atlcli completion bash >> ~/.bashrcsource ~/.bashrcAfter setup, press Tab to complete:
# Complete commandsatlcli j<Tab> # → jira
# Complete subcommandsatlcli jira i<Tab> # → issue
# Complete nested subcommandsatlcli jira issue c<Tab> # → comment, create
# Complete flagsatlcli jira search --<Tab> # → --assignee, --jql, --project, ...How It Works
Section titled “How It Works”atlcli uses dynamic completions. When you press Tab, your shell calls atlcli completion __complete with the current command line. atlcli returns matching completions including:
- Built-in commands - auth, wiki, jira, log, plugin, etc.
- Subcommands - nested commands like
jira issue create - Flags - command-specific and global flags
- Plugin commands - any installed plugin commands
Plugin Support
Section titled “Plugin Support”Completions automatically include commands from installed plugins. If you install a plugin that provides the git command with subcommands like hook, commit, those will be available in tab completion.
# Plugin commands are includedatlcli git <Tab> # → hook, commit, ...Troubleshooting
Section titled “Troubleshooting”Completions not working
Section titled “Completions not working”-
Ensure the completion script is loaded:
Terminal window # Zshtype _atlcli# Bashcomplete -p atlcli -
Reload your shell configuration:
Terminal window source ~/.zshrc # or ~/.bashrc -
Test completions directly:
Terminal window atlcli completion __complete jira# Should output: analyze, board, bulk, ...
Slow completions
Section titled “Slow completions”Completions load plugins on each invocation. If you have many plugins, this may add slight latency. The built-in command structure is cached in the CLI.
Manual Script Installation
Section titled “Manual Script Installation”If you prefer to manage the completion script manually:
# Generate and save the scriptatlcli completion zsh > ~/.atlcli-completion.zsh
# Source it in your .zshrcecho 'source ~/.atlcli-completion.zsh' >> ~/.zshrcFish Shell
Section titled “Fish Shell”Fish shell completion is not yet supported. Track progress in GitHub Issues.
Related Topics
Section titled “Related Topics”- CLI Commands - Full command reference
- Plugins - Plugin commands are also completed