Replies: 1 comment
|
Our proposal process has been updated to no longer require discussions so we'll close this: Instead create a feature request on the repo in question and maintainers will assess 🖖 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Add shell autocompletion (bash, zsh, fish) for the
praxis-forgeCLI via acompletions <shell>subcommand.Motivation
The CLI has ~21 leaf commands across 4 subcommand groups, global flags, and enum-valued options. Shell completion would reduce friction for users who need to remember subcommand names and flag spellings.
Since the project already uses clap 4.6 with derive macros, the
clap_completecrate provides first-party support with minimal effort.Proposed Solution
Phase 1 — Static completions
clap_completeas a dependencycompletions <shell>subcommand that callsclap_complete::generate()for bash, zsh, fish, and PowerShellValueEnumonOutputFormatandRuntimeProvider(replacing manualFromStrimpls) so clap can advertise their possible values (text|json,auto|docker|podman) to completion scriptsThis covers all subcommands, flags, and fixed-value options.
Phase 2 (optional) — Dynamic completions
clap_complete::CompleteEnv(clap 4.5+) for shell-side dynamic completionforge.yamlto suggest valid cluster, service, and stack names for positional argumentsAcceptance Criteria
praxis-forge completions bash|zsh|fishgenerates a working completion script--outputcompletes totext,json;--runtimecompletes toauto,docker,podman--helpoutput or READMEAlternatives Considered
Additional Context
Review guidance
completionssubcommand wiring and theValueEnumderive migrationManual verification
cargo build./target/debug/praxis-forge completions bash > /tmp/forge.bashsource /tmp/forge.bashpraxis-forge <TAB>and confirm subcommands appearpraxis-forge --output <TAB>and confirmtext/jsonappearAll reactions