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
242242
243243 case Shell . Pwsh :
244244 {
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 ? "\\ " : "" ;
245248 if ( _settings . UseWindowsTerminal )
246249 {
247250 info . FileName = "wt.exe" ;
@@ -256,7 +259,7 @@ private ProcessStartInfo PrepareProcessStartInfo(string command, bool runAsAdmin
256259 info . ArgumentList . Add ( "-NoExit" ) ;
257260 }
258261 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" : "" ) } ") ;
260263 break ;
261264 }
262265
You can’t perform that action at this time.
0 commit comments