Skip to content

fix: accept pwsh for completion shell#257

Open
mi6886 wants to merge 1 commit into
CortexLM:mainfrom
mi6886:codex-fix-completion-pwsh-53188
Open

fix: accept pwsh for completion shell#257
mi6886 wants to merge 1 commit into
CortexLM:mainfrom
mi6886:codex-fix-completion-pwsh-53188

Conversation

@mi6886
Copy link
Copy Markdown

@mi6886 mi6886 commented May 12, 2026

Fixes PlatformNetwork/bounty-challenge#53188.

This updates the completion shell parser so cortex completion pwsh is accepted as an alias for PowerShell, matching the existing shell-detection helpers that already map pwsh to Shell::PowerShell.

Changes:

  • Replaces the strict clap_complete::Shell value enum parser for the completion positional argument with a small Cortex-owned parser.
  • Preserves the existing shell names: bash, zsh, fish, powershell, and elvish.
  • Adds pwsh as a PowerShell alias.
  • Adds regression coverage for cortex completion pwsh and unsupported shell rejection.

Verification:

  • git diff --check

Note: I could not run the focused Rust tests locally because this environment does not currently have cargo installed in PATH.

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