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
886 886
887#[cfg(target_os = "windows")]887#[cfg(target_os = "windows")]
888fn to_windows_shell_type(shell: &str) -> WindowsShellType {888fn 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 {
890 WindowsShellType::Powershell894 WindowsShellType::Powershell
891 } else if shell == "cmd" || shell.ends_with("cmd.exe") {895 } else if shell == "cmd" || shell.ends_with("cmd.exe") {
892 WindowsShellType::Cmd896 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