History

windows: Treat `pwsh` as `PowerShell` (#16409)

`pwsh` is the newer version of `PowerShell`, while the one that comes pre-installed on Windows is called `Windows PowerShell` and is an older version. I have no idea why Microsoft dose this and not updated the `Windows Powershell` on Windows. Release Notes: - N/A

张小白 committed 2 years ago

Commit c0ea8061 parent 1404e321 file · +5 −1Browse files

Unified · Split

crates/terminal_view/src/terminal_panel.rs+5−1
@@ -886,7 +886,11 @@ fn to_windows_shell_variable(shell_type: WindowsShellType, input: String) -> Str · 885 unmodified lines
886886
887887 #[cfg(target_os = "windows")]
888888 fn to_windows_shell_type(shell: &str) -> WindowsShellType {
889− if shell == "powershell" || shell.ends_with("powershell.exe") {
889+ if shell == "powershell"
890+ || shell.ends_with("powershell.exe")
891+ || shell == "pwsh"
892+ || shell.ends_with("pwsh.exe")
893+ {
890894 WindowsShellType::Powershell
891895 } else if shell == "cmd" || shell.ends_with("cmd.exe") {
892896 WindowsShellType::Cmd

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t