diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs index 24d263578..66917d594 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs @@ -237,6 +237,19 @@ namespace Flow.Launcher.Plugin.Shell break; } + case Shell.Pwsh: + { + info.FileName = "pwsh.exe"; + if (_settings.LeaveShellOpen) + { + info.ArgumentList.Add("-NoExit"); + } + info.ArgumentList.Add("-Command"); + info.ArgumentList.Add(command); + + break; + } + case Shell.RunCommand: { var parts = command.Split(new[] diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs b/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs index a3cac1cb8..47b46055c 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Settings.cs @@ -36,6 +36,6 @@ namespace Flow.Launcher.Plugin.Shell Cmd = 0, Powershell = 1, RunCommand = 2, - + Pwsh = 3, } } diff --git a/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml b/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml index 39fb21c59..240bda953 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml @@ -41,6 +41,7 @@ HorizontalAlignment="Left"> CMD PowerShell + Pwsh RunCommand diff --git a/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml.cs index f4e8229b7..ebb47dd15 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Windows; using System.Windows.Controls; @@ -72,6 +72,7 @@ namespace Flow.Launcher.Plugin.Shell { Shell.Cmd => 0, Shell.Powershell => 1, + Shell.Pwsh => 2, _ => ShellComboBox.Items.Count - 1 }; @@ -81,6 +82,7 @@ namespace Flow.Launcher.Plugin.Shell { 0 => Shell.Cmd, 1 => Shell.Powershell, + 2 => Shell.Pwsh, _ => Shell.RunCommand }; LeaveShellOpen.IsEnabled = _settings.Shell != Shell.RunCommand;