Skip to content

SSL Teams Shell Completion

Use this page after installing the CLI. For command behavior and option details, see the CLI command reference; for the operational sequence, see the DevOps playbook.

sslteam completion writes a shell-specific completion file. It does not contact the backend or read credentials, certificates, private keys, fingerprints, or persisted trust state. Package installation (macOS PKG, DEB, RPM) puts these files into standard, shell-recognized completion directories; it never edits ~/.bashrc, ~/.bash_profile, or ~/.zshrc.

The Bash file is a Bash completion script, discovered by the Bash completion framework. The Zsh file is a native Zsh completion function, discovered through $fpath by compinit. On systems without a Bash completion framework, Bash must source the installed sslteam file directly.

Both files are generated from the registered Picocli command model during the Maven build and by sslteam completion. They therefore follow the current Java command options: local ca root create, import, show, and remove do not offer --base-url, while backend-facing ca status and ca root list do.

The generated command suggestions include top-level identity inspection with sslteam me alongside authentication, connectivity, configuration, TLS, CA, certificate, and user-account commands. Under sslteam users, suggestions include list, show, create, update, role, credential-state, reset-password, disable, enable, and delete, with each command's registered options.

Keep startup files shell-specific. A prompt such as bash-3.2$ means the current shell is Bash, so ~/.bashrc and ~/.bash_profile must contain only Bash syntax. fpath, autoload, and compinit are Zsh syntax and belong only in ~/.zshrc. Never mix the two, and never source one shell's startup file from the other.

This guide covers macOS Bash 3.2, Bash with the bash-completion framework, plain Zsh, and Zsh managed by Oh My Zsh. For each, first check whether completion is already enabled, then apply the matching setup only if it is disabled.

Bash

1. Check if enabled

if complete -p sslteam >/dev/null 2>&1; then
  printf '%s\n' 'SSL Teams Bash completion: enabled'
else
  printf '%s\n' 'SSL Teams Bash completion: disabled'
fi

2. macOS built-in Bash 3.2

macOS's /bin/bash 3.2 does not include bash-completion and does not scan /usr/local/share/bash-completion/completions automatically. Source the installed file directly:

source /usr/local/share/bash-completion/completions/sslteam
complete -p sslteam

To load it for future Bash sessions, add this to the startup file selected above:

if [ -r /usr/local/share/bash-completion/completions/sslteam ]; then
  source /usr/local/share/bash-completion/completions/sslteam
fi

3. Bash with bash-completion

Bash does not scan completion directories by itself; the bash-completion framework does. The following loader is valid on Linux and macOS with Homebrew, provided the framework is installed at one of these paths. It does nothing when none of the paths exists, which is why it is not sufficient for a bare macOS Bash 3.2 installation:

if shopt -q login_shell; then printf '%s\n' "$HOME/.bash_profile"; else printf '%s\n' "$HOME/.bashrc"; fi

Add this loader to that one file. It never names sslteam; the framework scans its own standard directories (including the one the SSL Teams package installs into) for every installed completion script:

for completion_loader in \
  /opt/homebrew/etc/profile.d/bash_completion.sh \
  /usr/local/etc/profile.d/bash_completion.sh \
  /usr/share/bash-completion/bash_completion \
  /etc/bash_completion; do
  if [ -r "$completion_loader" ]; then
    source "$completion_loader"
    break
  fi
done
unset completion_loader

Do not add this block to both ~/.bash_profile and ~/.bashrc unless ~/.bash_profile already sources ~/.bashrc.

4. Reload and verify

source ~/.bash_profile   # or ~/.bashrc, whichever file you edited
complete -p sslteam

Zsh (plain, no framework)

1. Check if enabled

if (( $+functions[_main_complete] )) && [[ "$(whence -w _sslteam 2>/dev/null)" == "_sslteam: function" ]]; then
  print 'SSL Teams Zsh completion: enabled'
else
  print 'SSL Teams Zsh completion: disabled'
fi

2. Enable generically, if disabled

Add this to ~/.zshrc. It never names sslteam or _sslteam; Zsh's native completion system (compinit) scans every directory in $fpath for completion functions, including the standard directory the SSL Teams package installs into:

fpath=(
  /opt/homebrew/share/zsh/site-functions
  /usr/local/share/zsh/site-functions
  /usr/share/zsh/vendor-completions
  /usr/share/zsh/site-functions
  $fpath
)
autoload -Uz compinit
compinit

If compinit is already initialized elsewhere in ~/.zshrc, only add the fpath block before that existing call.

3. Reload and verify

source ~/.zshrc
whence -w _sslteam

Then type sslteam and press Tab.

Zsh with Oh My Zsh

Oh My Zsh initializes compinit itself when it loads:

source "$ZSH/oh-my-zsh.sh"

Because of that, the standard completion directories must be added to $fpath before this line, or Oh My Zsh's compinit will not see them.

1. Check if enabled

Use the same check as plain Zsh:

if (( $+functions[_main_complete] )) && [[ "$(whence -w _sslteam 2>/dev/null)" == "_sslteam: function" ]]; then
  print 'SSL Teams Zsh completion: enabled'
else
  print 'SSL Teams Zsh completion: disabled'
fi

2. Enable generically, if disabled

Edit ~/.zshrc and place this block immediately before the source "$ZSH/oh-my-zsh.sh" line. It never names sslteam or _sslteam:

fpath=(
  /opt/homebrew/share/zsh/site-functions
  /usr/local/share/zsh/site-functions
  /usr/share/zsh/vendor-completions
  /usr/share/zsh/site-functions
  $fpath
)

source "$ZSH/oh-my-zsh.sh"

3. Reload and verify

source ~/.zshrc
whence -w _sslteam

Then type sslteam and press Tab.

Locally generated completion files

If no package installed the executable (for example, a standalone build), write the generated scripts into the same standard directories used above instead of a one-off path:

sslteam completion bash > /usr/local/share/bash-completion/completions/sslteam
sslteam completion zsh > /usr/local/share/zsh/site-functions/_sslteam

Because these directories are already covered by the generic Bash and Zsh setup above, no further startup-file change is needed.

What package installation does

Feature Installed by the package Startup-file change needed
Bash completion Yes, in the standard Bash completion directory. Initialize the Bash completion framework once, from ~/.bash_profile or ~/.bashrc.
Zsh completion Yes, in a standard Zsh site-functions directory. Add the standard Zsh completion directories to $fpath once, then run compinit.

Package installation does not edit ~/.zshrc, ~/.bash_profile, or ~/.bashrc. Completion becomes active only after the shell's completion framework has been initialized and the shell has been reloaded.