desktop / desktop

Focus on what matters instead of fighting with Git.
https://desktop.github.com
MIT License
19.62k stars 9.38k forks source link

"Open in Powershell" option opens PowerShell in classic mode #10002

Open Halofreak1990 opened 4 years ago

Halofreak1990 commented 4 years ago

A clear and concise description of what the feature or problem is.

As of a recent update to GitHub Desktop, the "Open in Powershell" option opens PowerShell in classic mode, whereas previously, it opened in the native PowerShell mode. Classic mode behaves like CMD, with mouse input by default restricted to context actions, instead of the rich experience PowerShell's native mode offers. This means a loss of options, like quick select and paste, unless explicitly enabled, and if the standard Windows handling of CMD is any indication, this means having to change this setting on a per-window basis.

Proposed solution

Revert the "Open in Powershell" option to the previous iteration, to allow users the rich experience they were used to before the change.

tierninho commented 4 years ago

@Halofreak1990 Thank for filing this. Please provide some more details:

Also, is PowerShell classic a setting within PowerShell or a different app altogether? Any idea how you can activate it? I am not familiar with Classic mode.

Halofreak1990 commented 4 years ago

@tierninho, I'm using Version 2.5.2. I also only have one item in the dropdown.

Upon further investigation, the problem seems to stem from the way PowerShell is invoked by GitHub desktop: If I launch PowerShell with the same command that Desktop uses through CMD.exe I get the current behavior, whereas starting powershell from C#'s Process.Start(), Windows Run (or the search bar), PowerShell launches as it did before.

tierninho commented 4 years ago

As far as I'm aware the code for opening a shell for this hasn't been modified. Hopefully one of our developers can shed some light.

At this point, if you are able to share your logs, they would be helpful.

niik commented 3 years ago

Hey @Halofreak1990, thanks for opening this! I'm afraid I don't know much about PowerShell classic and the new PowerShell but we currently have two supported shells in the app, PowerShell and PowerShell Core. The code which locates the executable for either of those are

https://github.com/desktop/desktop/blob/03c154c463552a338a1eacceb1dd72abfeb42928/app/src/lib/shells/win32.ts#L145-L182

https://github.com/desktop/desktop/blob/03c154c463552a338a1eacceb1dd72abfeb42928/app/src/lib/shells/win32.ts#L184-L208

If you'd be interested in adding support for this new powershell there's documentation available at https://github.com/desktop/desktop/blob/03c154c463552a338a1eacceb1dd72abfeb42928/docs/technical/shell-integration.md.

I hope that is helpful!

curtcurt871 commented 3 years ago

A clear and concise description of what the feature or problem is.

As of a recent update to GitHub Desktop, the "Open in Powershell" option opens PowerShell in classic mode, whereas previously, it opened in the native PowerShell mode. Classic mode behaves like CMD, with mouse input by default restricted to context actions, instead of the rich experience PowerShell's native mode offers. This means a loss of options, like quick select and paste, unless explicitly enabled, and if the standard Windows handling of CMD is any indication, this means having to change this setting on a per-window basis.

Proposed solution

Revert the "Open in Powershell" option to the previous iteration, to allow users the rich experience they were used to before the change.

https://github.com/desktop/desktop/issues/10002#issue-638370691