File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Plugins/Flow.Launcher.Plugin.Shell Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,9 @@ private ProcessStartInfo PrepareProcessStartInfo(string command, bool runAsAdmin
242
242
243
243
case Shell . Pwsh :
244
244
{
245
+ // Using just a ; doesn't work with wt, as it's used to create a new tab for the terminal window
246
+ // \\ must be escaped for it to work properly, or breaking it into multiple arguments
247
+ var addedCharacter = _settings . UseWindowsTerminal ? "\\ " : "" ;
245
248
if ( _settings . UseWindowsTerminal )
246
249
{
247
250
info . FileName = "wt.exe" ;
@@ -256,7 +259,7 @@ private ProcessStartInfo PrepareProcessStartInfo(string command, bool runAsAdmin
256
259
info . ArgumentList . Add ( "-NoExit" ) ;
257
260
}
258
261
info . ArgumentList . Add ( "-Command" ) ;
259
- info . ArgumentList . Add ( $ "{ command } \\ ; { ( _settings . CloseShellAfterPress ? $ "Write-Host '{ Context . API . GetTranslation ( "flowlauncher_plugin_cmd_press_any_key_to_close" ) } '\\ ; [System.Console]::ReadKey()\\ ; exit" : "" ) } ") ;
262
+ info . ArgumentList . Add ( $ "{ command } { addedCharacter } ; { ( _settings . CloseShellAfterPress ? $ "Write-Host '{ Context . API . GetTranslation ( "flowlauncher_plugin_cmd_press_any_key_to_close" ) } '\\ ; [System.Console]::ReadKey()\\ ; exit" : "" ) } ") ;
260
263
break ;
261
264
}
262
265
You can’t perform that action at this time.
0 commit comments