You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ct has a growing command tree with nested commands and options, but currently offers no way to generate shell completion. Users must remember or repeatedly inspect commands such as ct report permissions --help.
Proposed CLI
Add a top-level command that writes a completion script to stdout:
ct completion zsh
ct completion bash
ct completion fish
Example installation for zsh:
mkdir -p ~/.zfunc
ct completion zsh >~/.zfunc/_ct
The user's ~/.zshrc can then load it through fpath and compinit.
Requirements
Generate completion from the Commander command structure where practical, so commands and options do not drift from the actual CLI.
Complete top-level commands, nested subcommands, options, and enumerated option values.
Include current nested surfaces such as report permissions and its --by-subject, --by-object, and --by-both options.
Use filename/path completion for options that accept files or directories.
Work from both the npm installation and standalone binaries.
Document installation for zsh, bash, and fish.
Add tests that verify representative nested commands and options are present in each generated script.
Writing a completion script must not contact ChurchTools or require authentication.
Each command exits successfully without credentials, emits a non-empty script, and the installed completion offers nested commands/options matching ct --help and the relevant subcommand help output.
Activity
feat(completion): Tab completion by calling `ct` back, not by generat…
Merge pull request #134 from bwl21/feat/132-shell-completion