Tab-completion for the three tools ships in tools/auto-complete/ and is installed by cmake --install (and every CPack archive) into the directories the shells scan by default.

FileShellTool
dso-keygen.bash · _dso-keygenBash · Zshdso-keygen
dso-sign.bash · _dso-signBash · Zshdso-sign
dso-verify.bash · _dso-verifyBash · Zshdso-verify

Installed locations

<prefix>/share/bash-completion/completions/dso-keygen   (and -sign, -verify)
<prefix>/share/zsh/site-functions/_dso-keygen           (and -sign, -verify)

With <prefix> = /usr or /usr/local, both shells pick them up automatically on the next session. The install rules are OPTIONAL, so a stripped source tree still configures.

From a checkout (no install)

Bash — current shell:

for f in tools/auto-complete/*.bash; do source "$f"; done

Zsh — add the directory to fpath before compinit:

fpath=("$PWD/tools/auto-complete" $fpath)
autoload -Uz compinit && compinit

What completes

  • dso-keygen — every option; --out-dir / --out-private-dir / --out-public-dir complete directories.
  • dso-sign — options; --key completes *.key files and directories; the positional completes *.ffs, *.so and directories.
  • dso-verify — options; --keys completes directories; the positional completes *.ffs, *.so and directories.

Keeping it in sync

The completion, the tool's --help, and the argument parser in apps/src/<tool>.cpp are three copies of one interface. Change a flag and update all three — the CONTRIBUTING note calls this out.