cli: torb completions <shell> #807
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language#807
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
torb completions <shell>prints the completion script oftorbfor bash, zsh, fish or PowerShell, generated from the declaration oftorbitself (torbCommand()incompiler/src/cli/declaration.trb) byCommand.completionofstd/cli. This is the compiler half of CLI slice 3; thestd/clihalf landed in #125 (PR #785).Requirements
torb completions <shell>withbash,zsh,fishorpowershell, the compiler shall printtorbCommand().completion(<Shell>)to standard output and exit 0, writing no file.torb completionsshall print the valid names to standard error and exit non-zero, through the usualstd/clierror path.completionssubcommand shall be a declared command oftorbCommand()with a positionalshellargument, so it appears intorb --helpand in its own completion script.Command.completionfor the current declaration (no second list of commands or flags).Done when
completions bash|zsh|fish|powershelland shows the declared command, and that an unknown shell is refused with the valid names.torbCommand().completion(...), and checks that the script listscompletionsitself.docs/design/CLI.mdslice 3 row anddocs/standard-library/cli.mdmention the subcommand as done; regeneratedskills/.sh tools/gates.sh agreen in forge CI;tools/check-commits.shclean; one Conventional Commit (feat(cli): torb completions <shell>).Seed
The compiler imports
std/clithrough the seed.ShellandCommand.completionexist in the seed only after a seed refresh that contains PR #785, so this issue cannot compile before that refresh. It adds no syntax, native or driver flag, and no std name looked up by string, so the two-commit rule does not apply: it is a single commit that uses the new API once the seed has it. The seed refresh itself stays Torben's (outside the loop).Readiness
Not
ready: held until a seed containingCommand.completionis published. Setreadywhenseed/(or the seed in use by the bootstrap) is refreshed pastf823aa3f. Related: #124 (CLI slice 2, the declaration it extends; not blocking).Source
Dependencies
std/clicompletion scripts; landed in PR #785) and on a seed refresh (Torben's).[loop:torbscript] intake: in scope (CLI slice 3, compiler half), no duplicate. The seed precondition is met: the nightly published seed
56ea5b416don 2026-11-15, newer than PR #785 (f823aa3f, 2026-11-14), soShellandCommand.completionexist in the seed. Requirements and done criteria are complete and testable; one commit, no seed change of its own. decided by the loop: ready.next: implement (ready)
[loop:torbscript] claim implement by session:loop-torbscript-807-impl until 2026-11-16T02:35:00Z
[loop:torbscript] release implement: #825
One commit
feat(cli): torb completions <shell>, Argus requested.tools/check-commits.shis clean. Not verified: build, format, tests andtools/gates.sh a(CI only, result unknown); theskills/copy ofcli.mdis hand-mirrored, not regenerated; the book session satisfyingcommand-pages.test.trbis checked by inspection only.[loop:torbscript] claim implement by loop-torbscript-807-fix until 2026-11-16T04:40:23Z
[loop:torbscript] release implement: fixed red CI on PR #825 (
dd0d1a6b)Cause:
ci / tier A (linux-x64)failed only in theformat --checkgate (2 of 1780 files would change:compiler/src/cli/declaration.trb,compiler/tests/cli-declaration.test.trb); every other tier A gate was green.ci / gatesis the aggregate job that failed because of it.Fix:
fix(cli): format the completions declaration and its test.Ok(torbCommand().completion(shell))becomesOk torbCommand().completion(shell), andassert x == falsegets its parentheses. The formatter of this PR's CI-builttorbwas run on the two files outside the gateway (format --checknow lists 0 files);tools/check-commits.sh origin/main HEADis clean. No local build or gate run; CI reruns on the new head.next: waiting (CI on
dd0d1a6b, then the merge gate)