476
* execution.
477
*/
478
>
function isSubExecution(unresolvedCommandLines: string[], commandLine: vscode.TerminalShellExecutionCommandLine): { unresolvedCommandLines: string[] } | false {
extHostTerminalShellIntegration.ts
479
>
if (unresolvedCommandLines.length === 0) {
480
return false;
481
}
483
>
const subExecutionLines = splitAndSanitizeCommandLine(commandLine.value);
484
>
if (newUnresolvedCommandLines && newUnresolvedCommandLines.length > 0) {
485
>
// If all sub-execution lines are in the command line, this is part of the
486
>
// multi-line execution.
487
>
while (newUnresolvedCommandLines.length > 0) {
488
>
if (newUnresolvedCommandLines[0] !== subExecutionLines[0]) {
489
>
break;
490
>
}
491
newUnresolvedCommandLines.shift();
492
subExecutionLines.shift();
493
}
495
>
if (subExecutionLines.length === 0) {
496
return { unresolvedCommandLines: newUnresolvedCommandLines };
497
}
499
return false;
500
}