Skip to content

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

Closed

Description

@TylerLeonhardt

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.

Activity

  1. added
    terminalGeneral terminal issues that don't fall under another label
    feature-requestRequest for new features or functionality
    on Nov 18, 2020
  2. vscode-triage-bot commented on Nov 18, 2020

    @vscode-triage-bot

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  3. eamodio commented on Nov 18, 2020

    @eamodio
    Contributor

    Megan Rogge (@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.

  4. TylerLeonhardt commented on Nov 18, 2020

    @TylerLeonhardt
    MemberAuthor

    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.

  5. added
    unreleasedPatch has not yet been released in VS Code Insiders
    insiders-releasedPatch has been released in VS Code Insiders
    and removed
    unreleasedPatch has not yet been released in VS Code Insiders
    on Jan 11, 2021
  6. lramos15 commented on Jan 26, 2021

    @lramos15
    Member
  7. TylerLeonhardt commented on Jan 27, 2021

    @TylerLeonhardt
    MemberAuthor

    #115113 has been fixed

  8. locked and limited conversation to collaborators on Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestRequest for new features or functionalityterminalGeneral terminal issues that don't fall under another labelverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions