Skip to content

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

Description

@prinws-11

Project

cortex

Description

The explicit completion command uses clap_complete::Shell, which only accepts powershell, while Cortex’s own shell-detection helpers already recognize both powershell and pwsh as the same shell. This makes the CLI reject a shell name that the rest of Cortex already treats as valid.

Error Message

invalid value 'pwsh' for '[SHELL]'

Debug Logs

System Information

OS: Windows 10
RAM: 16 GB
CPU: Intel(R) Core(TM) i7-1165G7 @ 2.8GHz(8 CPUs), ~2.8GH

Screenshots

pwsh_o8BueHSZij.mp4

Steps to Reproduce

  1. Run cortex completion pwsh.
  2. Observe the argument parsing result.

Expected Behavior

pwsh should be accepted as an alias for PowerShell, consistent with Cortex’s internal shell detection.

Actual Behavior

The command rejects pwsh, even though other Cortex code paths map pwsh to PowerShell.

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    ideIssues related to IDEvalidValid issue

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions