completion
Tab completion for permdock in bash, zsh and fish - commands, subcommands, flags, enum values and catalogue values such as doctor codes and init archetypes.
permdock completion bash|zsh|fish prints a completion script. The script asks the installed permdock for candidates on every Tab, so completion follows the version in the project without regenerating the script.
Usage
eval "$(permdock completion bash)" # ~/.bashrc
permdock completion zsh > "${fpath[1]}/_permdock" # zsh, then restart the shell
permdock completion fish > ~/.config/fish/completions/permdock.fish| Flag | Description |
|---|---|
shell (positional) | bash, zsh or fish; any other value exits 2 with the nearest match |
The bash script runs on bash 3.2, the version macOS ships.
What completes
- Command and subcommand names, from the same manifest
--helpreads. Hidden commands are left out. - Flags of the command typed so far, plus the global flags. Hidden flags are left out.
- The values of a flag with a fixed set, such as
--formatand--fail-on. - Catalogue values:
init --archetype,--framework,--featureand--integrationfrom the preset catalogue,doctor --onlycheck codes and groups,skills install --clientagent clients,rls generate --splitparts andcodemodversions. A comma-separated value completes after the last comma and skips the values already given. - File names, from the shell, after a flag that takes a path and wherever
permdockoffers nothing.
The scripts call the hidden permdock __complete -- <words>, which prints one candidate per line. It prints text in agent mode too, since its reader is the shell.
Side effects
What each command may change; side effects explains each one.
| Command | Side effects |
|---|---|
permdock completion | None |
Why
- The binary answers, not the script. A static script lists the flags of the version that wrote it and falls behind on the next upgrade. Asking
permdock __completekeeps one source, the manifest, for the parser, the help, the docs test and completion. - Catalogue values come from the code that checks them.
doctor --onlycompletes from the table of checksdoctorruns, andinit --archetypefrom the preset catalogueinitvalidates against, so a value Tab offers is a value the command accepts.
Related
Last updated on
doctor
Diagnose a PermDock installation: server-only imports in client entries, unknown references, ungranted permissions, stale catalogs, roles or tenants read from unverified claims, missing skills and the TypeScript version.
config
Check permdock.config.ts for keys PermDock does not read, or print the effective config with every default filled in.