Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PowerShell 7+ the default shell if it's available #110828

Closed
TylerLeonhardt opened this issue Nov 17, 2020 · 5 comments · Fixed by #112768
Closed

Make PowerShell 7+ the default shell if it's available #110828

TylerLeonhardt opened this issue Nov 17, 2020 · 5 comments · Fixed by #112768
Assignees
Labels
feature-request Request for new features or functionality terminal Integrated terminal issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Nov 17, 2020

Scenario

The specific scenario I want to solve for is this:

  • JS/Java/Python developer on Windows wants to use the latest PowerShell because improved shell experience
  • They install PowerShell from the Microsoft Store because it's the easiest way for them to get it and auto-update
  • They expect that the PowerShell they installed from the Store replaces Windows PowerShell as the default shell used in VS Code

NOTE: part of this assumption the user has is because PS7 already shows up as the default in Windows Terminal (if PS7 is installed)

This would be a great way for customers adoption of the latest version of PowerShell rather than using Windows PowerShell which hasn't been updated in years.

Today

Today the user can "choose their default shell" in the drop down of terminals but this does not work for PowerShell installed via the Store because the install location is different... So today, the user can only, configure their shell on windows to be "terminal.integrated.shell.windows": "pwsh" to set the shell to any PowerShell 7.

Much like Windows Terminal, VS Code could discover which PowerShell is available and use that as the default so that users can easily transition.

Design ideas

In the PowerShell extension, we wrote up this very exhaustive class that could "discover" powershell on any platform:

https://github.com/PowerShell/vscode-powershell/blob/master/src/platform.ts#L67

This includes scenarios like PowerShell installed via Store, PowerShell installed via .NET Global Tool, install via MSI... etc.

I originally showed this code to WT folks so they may have adapted it for them.

I think the "terminal.integrated.shell.windows" should still be honored if it is set for backcompat purposes.

@meganrogge meganrogge added terminal Integrated terminal issues feature-request Request for new features or functionality labels Nov 18, 2020
@eamodio
Copy link
Contributor

eamodio commented Nov 18, 2020

@meganrogge I would hope we could prioritize this higher, as the vscode experience when installing PowerShell from the Microsoft Store is basically broken -- we won't show that option at all.

@TylerLeonhardt
Copy link
Member Author

Bolded that bit. That to me seems like a bug and the making it the default is more of a feature ask... guess this could have been two separate issues but the going above and beyond by making PS7 the default will be a way better experience for everyone.

@lramos15
Copy link
Member

#115113

@lramos15 lramos15 reopened this Jan 26, 2021
@TylerLeonhardt
Copy link
Member Author

#115113 has been fixed

@TylerLeonhardt TylerLeonhardt removed the verification-found Issue verification failed label Jan 27, 2021
@lramos15 lramos15 added the verified Verification succeeded label Jan 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality terminal Integrated terminal issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@eamodio @TylerLeonhardt @lramos15 @kieferrm @meganrogge and others