From ef56d91c2ff117fd19b0e2cc06b749d0b431632b Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 18 Nov 2021 05:56:51 +1100 Subject: [PATCH] add filename param to ShellRun command for running other shell types --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 2 +- Flow.Launcher/PublicAPIInstance.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index a5602ac13..0897de8a4 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -35,7 +35,7 @@ namespace Flow.Launcher.Plugin /// The command or program to run /// Thrown when unable to find the file specified in the command /// Thrown when error occurs during the execution of the command - void ShellRun(string cmd); + void ShellRun(string cmd, string filename = "cmd.exe"); /// /// Save everything, all of Flow Launcher and plugins' data and settings diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 360529ea9..eda173ee1 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -107,9 +107,9 @@ namespace Flow.Launcher }); } - public void ShellRun(string cmd) + public void ShellRun(string cmd, string filename = "cmd.exe") { - var startInfo = ShellCommand.SetProcessStartInfo("cmd.exe", arguments: $"/C {cmd}", createNoWindow: true); + var startInfo = ShellCommand.SetProcessStartInfo(filename, arguments: $"/C {cmd}", createNoWindow: true); ShellCommand.Execute(startInfo); }