Skip to content

Accept pwsh for shell completions#405

Open
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:completion-pwsh-alias
Open

Accept pwsh for shell completions#405
GreyforgeLabs wants to merge 1 commit into
CortexLM:mainfrom
GreyforgeLabs:completion-pwsh-alias

Conversation

@GreyforgeLabs
Copy link
Copy Markdown

Summary

  • Accept pwsh as a shell-completion alias for PowerShell.
  • Keep existing shell names intact with a small parser for completion shell arguments.
  • Add CLI regression coverage that completion pwsh --install reaches the PowerShell completion path.

Fixes PlatformNetwork/bounty-challenge#49285.

Validation

  • cargo test -p cortex-cli --test completion_pwsh --no-default-features --features cortex-tui -- --nocapture
  • cargo check -p cortex-cli --no-default-features --features cortex-tui
  • cargo fmt --package cortex-cli --check
  • git diff --check
  • git diff --cached --check

Note

Direct completion generation in the debug test binary currently trips an unrelated existing clap debug assertion for a duplicated mcp ls alias, so the regression covers the parser and PowerShell install path without invoking the generator.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG] cortex completion pwsh is rejected even though Cortex internally treats pwsh as PowerShell

1 participant