Claude Code — Providing the Right Commands for the Bash Tool on Windows
Friday, August 29, 2025Linux and macOS are far more popular than Windows among developers. It must be said that a large number of them work on web projects, and most servers run Linux.
Personally, since I mainly work on add-ins for Autodesk software, which most often run exclusively on Windows, I remain loyal to the Redmond-based company's platform.
For the past few weeks, I've been using Claude Code, a programming assistant developed by Anthropic. I find it more capable than its competitors: Claude models aren't necessarily more powerful, but Claude Code is particularly good at gathering context and using the tools at its disposal.
The problem is that at Anthropic, they must all use Macs, so Windows support leaves something to be desired.
For all shell commands — deleting files, creating folders, etc. — Claude Code actually goes through Git Bash.
Git Bash is a tool installed with Git for Windows that provides a Bash environment on Windows. You may have already noticed that Claude Code uses rm to delete files, for example, instead of del.
So for all commands issued by Claude Code, it handles things on its own. But if you want to provide commands in a prompt or in a CLAUDE.md file, you need to keep this detail in mind.
You can test this yourself. If, for example, you ask:
Show me the day of the year
Claude Code will probably (it's not deterministic, so the answer may vary for you) use the PowerShell cmdlet Get-Date:
Bash(powershell -Command "Get-Date -UFormat %j")
⎿ 241
And here, you can see it prefixes with the powershell command. This is normal because it's a Bash shell, not PowerShell (even if your Claude Code session was launched from a PowerShell terminal).
Since the PowerShell directory is in the PATH environment variable, it works. Bash just needs to look for binaries with a .exe extension.