Skip to content

Shell Completions

atlcli provides tab completion support for Bash and Zsh shells. Completions work for commands, subcommands, flags, and plugin commands.

  • Bash or Zsh shell
  • atlcli installed and in PATH

Add to your ~/.zshrc:

Terminal window
eval "$(atlcli completion zsh)"

Or append the script permanently:

Terminal window
atlcli completion zsh >> ~/.zshrc
source ~/.zshrc

Add to your ~/.bashrc:

Terminal window
eval "$(atlcli completion bash)"

Or append the script permanently:

Terminal window
atlcli completion bash >> ~/.bashrc
source ~/.bashrc

After setup, press Tab to complete:

Terminal window
# Complete commands
atlcli j<Tab> # → jira
# Complete subcommands
atlcli jira i<Tab> # → issue
# Complete nested subcommands
atlcli jira issue c<Tab> # → comment, create
# Complete flags
atlcli jira search --<Tab> # → --assignee, --jql, --project, ...

atlcli uses dynamic completions. When you press Tab, your shell calls atlcli completion __complete with the current command line. atlcli returns matching completions including:

  1. Built-in commands - auth, wiki, jira, log, plugin, etc.
  2. Subcommands - nested commands like jira issue create
  3. Flags - command-specific and global flags
  4. Plugin commands - any installed plugin commands

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.

Terminal window
# Plugin commands are included
atlcli git <Tab> # → hook, commit, ...
  1. Ensure the completion script is loaded:

    Terminal window
    # Zsh
    type _atlcli
    # Bash
    complete -p atlcli
  2. Reload your shell configuration:

    Terminal window
    source ~/.zshrc # or ~/.bashrc
  3. Test completions directly:

    Terminal window
    atlcli completion __complete jira
    # Should output: analyze, board, bulk, ...

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.

If you prefer to manage the completion script manually:

Terminal window
# Generate and save the script
atlcli completion zsh > ~/.atlcli-completion.zsh
# Source it in your .zshrc
echo 'source ~/.atlcli-completion.zsh' >> ~/.zshrc

Fish shell completion is not yet supported. Track progress in GitHub Issues.

Jira and Confluence are trademarks of Atlassian Corporation Plc. atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.