Skip to content

refactor!: change default windows shell to powershell#14358

Open
RoloEdits wants to merge 1 commit intohelix-editor:masterfrom
RoloEdits:windows-shell
Open

refactor!: change default windows shell to powershell#14358
RoloEdits wants to merge 1 commit intohelix-editor:masterfrom
RoloEdits:windows-shell

Conversation

@RoloEdits
Copy link
Contributor

@RoloEdits RoloEdits commented Aug 31, 2025

This follows discussion from #14229 (comment). This follows a generally understood position that cmd can be finicky, and even buggy, but wont be fixed due to compatibility issues:

PowerShell is installed by default on Windows 7 SP1 and Windows Server 2008 R2 S1 and later, and cmd.exe is quite fiddly, so PowerShell is recommended for most Windows users. - https://github.com/casey/just

BREAKING: If user previously relied on specific cmd features or behavior, they will need to update their config.

@archseer
Copy link
Member

How significant is the difference in latency between cmd and powershell? I'm generally okay with this change

@RoloEdits
Copy link
Contributor Author

From what I have seen personally, as well as what other people seem to experience, its an order of magnitude difference. Say 20ms for CMD and 200ms for powershell.

Powershell Core should in theory be faster? Specially with newer runtimes, which employs a dynamic PGO, so the initial code generation is built to a "tier 0" level and then it can optimize as its running, but allows for faster startup times. This will depend on the users environment a lot, though, so hard to say in practice, but definitely slower than cmd, which is written in C. And also this PR is to make the Powershell Windows one the default, powershell, which comes with all relevant versions of Windows, where as pwsh, for Powershell Core, as far as I can tell, will always require installation?

This PR is really a tradeoff: its slower, which depending on what operations the user is doing could be noticeable, but also seems to be free of some cmd eccentricities.

I was hoping to get some more feedback on this before it was merged, from people who might switch over to test it out, but as it stands now, cant be sure of the fallout.

From #14229:

Apart from powershell being a bit more sluggish when starting this seem like a possible workaround for this issue.

and

I'm using shell = ["pwsh", "-command"] instead and it works fine but, at least to me, it doesn't quite feel as "snappy" as cmd.

As a general experience from switching.

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.

2 participants