File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 288288 "default" : " output" ,
289289 "description" : " Where to print the output of tasks. Note that the output panel does not support ANSI colors."
290290 },
291+ "outputToNewTerminal" : {
292+ "type" : " boolean" ,
293+ "default" : false ,
294+ "description" : " When using outputTo=terminal whether to use a new Terminal instance or reuse the last instance."
295+ },
291296 "checkForUpdates" : {
292297 "type" : " boolean" ,
293298 "default" : true ,
354359 "semver" : " ^7.5.0" ,
355360 "strip-ansi" : " 6.0.1"
356361 }
357- }
362+ }
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ class TaskfileService {
225225 if ( settings . outputTo === "terminal" ) {
226226 log . info ( `Running task: "${ taskName } ${ cliArgs } " in: "${ dir } "` ) ;
227227 var terminal : vscode . Terminal ;
228- if ( vscode . window . activeTerminal !== undefined ) {
228+ if ( vscode . window . activeTerminal !== undefined && settings . outputToNewTerminal === false ) {
229229 terminal = vscode . window . activeTerminal ;
230230 } else {
231231 terminal = vscode . window . createTerminal ( "Task" ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ class Settings {
66 public updateOn ! : string ;
77 public path ! : string ;
88 public outputTo ! : string ;
9+ public outputToNewTerminal ! : boolean ;
910 public checkForUpdates ! : boolean ;
1011 public treeNesting ! : boolean ;
1112 public treeSort ! : string ;
@@ -29,6 +30,7 @@ class Settings {
2930 this . updateOn = config . get ( "updateOn" ) ?? "change" ;
3031 this . path = config . get ( "path" ) ?? "task" ;
3132 this . outputTo = config . get ( "outputTo" ) ?? "output" ;
33+ this . outputToNewTerminal = config . get ( "outputToNewTerminal" ) ?? false ;
3234 this . checkForUpdates = config . get ( "checkForUpdates" ) ?? true ;
3335 this . treeNesting = config . get ( "tree.nesting" ) ?? true ;
3436 this . treeSort = config . get ( "tree.sort" ) ?? "default" ;
You can’t perform that action at this time.
0 commit comments