Repository navigation
fix(cli): accept --completions powershell, keep power-shell as an alias - #642
Conversation
… alias Only the spotify-tui spelling `power-shell` parsed, so the documented `powershell` failed with an invalid-value error. List `powershell` and keep `power-shell` as a clap alias. clap passes the value as typed, so the mapping in run_cli, now the pure completion_shell, matches both. Fixes LargeModGames#606 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: LargeModGames/spotatui/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe completion parser now accepts ChangesCompletion shell parsing
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Both documented PowerShell spellings are supported, and the other completion choices remain intact. No merge-blocking risk was found. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change adds the expected PowerShell spelling while keeping the old spelling working. No new security path was identified, although the available security coverage is incomplete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary
Fixes #606.
--completionsnow listspowershelland keepspower-shellas a clap alias (PossibleValue::new("powershell").alias("power-shell"), with every entry wrapped inPossibleValue). clap passes the value as typed, so the mapping, moved into a purecompletion_shellinsrc/runtime/mod.rs, matches"powershell" | "power-shell".README.mdis unchanged.Tests:
completions_accepts_powershell,completions_still_accepts_the_old_power_shell_spelling,completions_rejects_an_unknown_shellinruntime/cli.rs, and the optionalcompletion_shell_maps_both_powershell_spellingsinruntime/mod.rs.Testing
cargo fmt --all -- --check: cleancargo clippy --no-default-features --features telemetry,tui -- -D warnings: cleancargo test --no-default-features --features telemetry,tui: 1313 passed, 0 failedcargo test --no-default-features --features telemetry,tui completion: 4 passedpowershellremoved again,completions_accepts_powershellandcompletion_shell_maps_both_powershell_spellingsfail.--completions powershelland--completions power-shellboth print the same 319-line PowerShell script,--completions nushellexits 2 with the invalid-value error, and--helplists[possible values: bash, zsh, fish, powershell, elvish].Additional notes
This is one of five small PRs I opened together (for #606, #598, #597, #596 and #601). Each changelog entry sits at a different spot in
[Unreleased], and I test-merged all five in three orders without conflicts; together they pass the slim checks (1327 tests).Written with AI coding assistants: Codex drafted fixes for these issues, and Claude Code rebuilt each one on current main against the issue text and re-tested it.
🤖 Generated with Claude Code
Summary by CodeRabbit
--completionsoption now acceptspowershellas well as the existingpower-shellspelling. Other supported shells and handling of unsupported names remain unchanged.