claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Feature Request] Improve PowerShell shell configuration support for Windows

Open ryanstraight opened this issue 1 month ago • 1 comments

(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.

ryanstraight avatar Jan 04 '26 07:01 ryanstraight