Skip to content

[Feature Request] Improve PowerShell shell configuration support for Windows #16225

@ryanstraight

Description

@ryanstraight

(Written and provided verbatim by Claude Code.)

Shell configuration for Windows (PowerShell support)

Version: 2.0.75

Platform: Windows 11

Problem

The Bash tool on Windows runs through a bash wrapper that mangles PowerShell syntax:

  • $_ becomes empty (bash interprets it as a variable)
  • $false/$true get stripped or mangled
  • Complex pipelines with ForEach-Object fail
  • Quote escaping becomes extremely fragile

Example:

# Intended command
Get-ScheduledTask | Where-Object { $_.TaskName -match 'sync' }

# What bash wrapper produces
Get-ScheduledTask | Where-Object { extglob.TaskName -match 'sync' }

Current Workarounds

  • Wrapping in cmd /c "powershell.exe -NoProfile -Command '...'"
  • Using -Confirm:0 instead of -Confirm:$false
  • Avoiding complex pipelines entirely

These are inconsistent and error-prone.

Requested Feature

A setting to configure the shell used by the Bash tool:

{
"shell": "powershell"
}

Or a separate PowerShell tool that bypasses bash interpretation entirely.

Impact

Significantly improves Windows developer experience where PowerShell is the native shell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions