completion, doctor: the shared standard commands

core/completion prints bash, zsh, fish or PowerShell completion scripts
from a static command tree ("<program> completion <shell>"); core/doctor
is one report shape (resolved paths incl. the standard core/paths ones,
named checks), printed as a table or --json, exit 0/1/2. Together with
core/manual they implement the Yetano program standard
(docs/program-conventions.md in the meta-repo).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
terminarandClaude Opus 5.5 committed 2026-10-07 16:30:45 +02:00
1 parent e757fdd025
commit 13c1862c74
5 files changed
+479

No files matched your search

+15
View File
@@ -14,6 +14,8 @@ yetano.dev/yetano/core
yetano.dev/yetano/core/paths
yetano.dev/yetano/core/config
yetano.dev/yetano/core/manual
yetano.dev/yetano/core/completion
yetano.dev/yetano/core/doctor
```
Target platforms: Linux, FreeBSD, macOS, Windows. No Unix assumptions
@@ -268,6 +270,19 @@ heading). `Run` serves `manual`, `manual <topic>` and `manual --json
markdown}`) is what yet reads to show an installed program's manual
(`yet manual --package`, its TUI and yet-gui).
## core/completion and core/doctor
The other two standard commands of every Yetano program (see
docs/program-conventions.md in the meta-repository):
- `completion.Run(program, tree, args, w)` prints a bash, zsh, fish or
PowerShell completion script generated from a static `completion.Tree`
of the program's commands.
- `doctor.Report` collects the locations the program resolves
(`AddPaths(app)` adds the standard `core/paths` ones) and named checks;
`Run(args, stdout, stderr)` prints a table or `--json` and returns the
exit code (0 all good, 1 a check failed, 2 usage).
## Security
- Environment expansion is variable substitution only -- never shell