feat(std/cli): shell completion scripts #785
No reviewers
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!785
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/125-cli-completions"
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?
Adds
Command.completion(shell: Shell): Stringand theShelltype (Bash, Zsh, Fish, PowerShell) tostd/cli: a pure function that turns the declared command tree into the completion script of a shell (CLI slice 3, std/cli half).help) and--flag/--optionnames of the command the line is in, plus-hand--help, at every depth; option values are left to the shell's file completion.complete -F, zsh#compdef, fishcomplete -c, PowerShellRegister-ArgumentCompleter -Native.std/cli/tests/completion.test.trb): one golden test per shell, nested path test, a test that an added flag changes every script.docs/standard-library/cli.md(new section and declarations, skill copy updated by hand to match),docs/design/CLI.md(decision recorded, slice 3 done for std/cli).No seed, syntax, native or driver change.
torb completions <shell>follows as a separate issue after a seed refresh.Not verified locally (no bootstrap by rule): the golden texts were derived from the generator's algorithm by an independent script, so CI is the first real run.
torb docs skill --checkmay want a regeneratedskills/copy.Refs #125
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.