Synopsis
Behavior
- Generate the completion script for the named shell from the CLI’s own command definitions, so it always matches the installed
cowboyversion. - Write the script to stdout. The script is rendered into memory first, so piping into
head(a closed pipe) exits cleanly instead of panicking.
Flags
Example
Edge Cases
- An unrecognized shell name is rejected by argument parsing with the accepted values listed.
- A broken pipe on stdout is treated as success; any other write error fails the command.