mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[PTRun][Shell]Add a hidden option to use WindowsTerminal (#25661)
* Added an option in ExecutionShell for WindowsTerminal * undo change of nuget.config * Restore nuget.config
This commit is contained in:
@@ -190,6 +190,20 @@ namespace Microsoft.Plugin.Shell
|
|||||||
|
|
||||||
info = ShellCommand.SetProcessStartInfo("powershell.exe", workingDirectory, arguments, runAsVerbArg);
|
info = ShellCommand.SetProcessStartInfo("powershell.exe", workingDirectory, arguments, runAsVerbArg);
|
||||||
}
|
}
|
||||||
|
else if (_settings.Shell == ExecutionShell.WindowsTerminal)
|
||||||
|
{
|
||||||
|
string arguments;
|
||||||
|
if (_settings.LeaveShellOpen)
|
||||||
|
{
|
||||||
|
arguments = $"powershell -NoExit \"{command}\"";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
arguments = $"powershell \"{command}\"";
|
||||||
|
}
|
||||||
|
|
||||||
|
info = ShellCommand.SetProcessStartInfo("wt.exe", workingDirectory, arguments, runAsVerbArg);
|
||||||
|
}
|
||||||
else if (_settings.Shell == ExecutionShell.RunCommand)
|
else if (_settings.Shell == ExecutionShell.RunCommand)
|
||||||
{
|
{
|
||||||
// Open explorer if the path is a file or directory
|
// Open explorer if the path is a file or directory
|
||||||
|
|||||||
@@ -38,5 +38,6 @@ namespace Microsoft.Plugin.Shell
|
|||||||
Cmd = 0,
|
Cmd = 0,
|
||||||
Powershell = 1,
|
Powershell = 1,
|
||||||
RunCommand = 2,
|
RunCommand = 2,
|
||||||
|
WindowsTerminal = 3,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user