Skip to content

Commit ef56d91

Browse files
committed
add filename param to ShellRun command for running other shell types
1 parent 3e38a90 commit ef56d91

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public interface IPublicAPI
3535
/// <param name="cmd">The command or program to run</param>
3636
/// <exception cref="FileNotFoundException">Thrown when unable to find the file specified in the command </exception>
3737
/// <exception cref="Win32Exception">Thrown when error occurs during the execution of the command </exception>
38-
void ShellRun(string cmd);
38+
void ShellRun(string cmd, string filename = "cmd.exe");
3939

4040
/// <summary>
4141
/// Save everything, all of Flow Launcher and plugins' data and settings

Flow.Launcher/PublicAPIInstance.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ public void OpenSettingDialog()
107107
});
108108
}
109109

110-
public void ShellRun(string cmd)
110+
public void ShellRun(string cmd, string filename = "cmd.exe")
111111
{
112-
var startInfo = ShellCommand.SetProcessStartInfo("cmd.exe", arguments: $"/C {cmd}", createNoWindow: true);
112+
var startInfo = ShellCommand.SetProcessStartInfo(filename, arguments: $"/C {cmd}", createNoWindow: true);
113113
ShellCommand.Execute(startInfo);
114114
}
115115

0 commit comments

Comments
 (0)