Skip to content

cli: shell completions for bash and zsh#1

Open
munzzyy wants to merge 1 commit into
mainfrom
shell-completions
Open

cli: shell completions for bash and zsh#1
munzzyy wants to merge 1 commit into
mainfrom
shell-completions

Conversation

@munzzyy

@munzzyy munzzyy commented Jul 12, 2026

Copy link
Copy Markdown
Owner

actbreak --completions bash (or zsh) prints a completion script generated from the argparse parser itself, so flags and subcommands can't drift from a hand-kept list. README documents the source <(...) one-liner for each shell.

Tests assert every subcommand and flag appears in both outputs. The generated bash script passes bash -n. Still stdlib-only.

Walks the argparse definition at print time, so a new flag or subcommand
lands in completions without a second list to maintain. Bash output
verified with bash -n; zsh emits a standard #compdef file. Covered by
parser-driven tests, no new dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant