From c5ada0a3e588f9797da31db91cba3a7b6e732805 Mon Sep 17 00:00:00 2001 From: Rob Holt Date: Thu, 2 Jan 2020 13:19:27 -0800 Subject: [PATCH 1/2] Add configuration to enable/disable banner --- package.json | 5 +++++ src/session.ts | 5 +++++ src/settings.ts | 1 + 3 files changed, 11 insertions(+) diff --git a/package.json b/package.json index 0931fb3fb9..7c1e96b258 100644 --- a/package.json +++ b/package.json @@ -705,6 +705,11 @@ "type": "boolean", "description": "Use the vscode API to clear the terminal since that's the only reliable way to clear the scrollback buffer. Turn this on if you're use to 'Clear-Host' clearing scroll history as wellclear-terminal-via-lsp." }, + "powershell.integratedConsole.suppressStartupBanner": { + "type": "boolean", + "default": false, + "description": "Do not show the Powershell Integrated Console banner on launch" + }, "powershell.debugging.createTemporaryIntegratedConsole": { "type": "boolean", "default": false, diff --git a/src/session.ts b/src/session.ts index 5a2cd3a6ac..a217c1451b 100644 --- a/src/session.ts +++ b/src/session.ts @@ -179,12 +179,17 @@ export class SessionManager implements Middleware { } } + const startupBanner = this.sessionSettings.integratedConsole.suppressStartupBanner + ? "" + : "`n`n =====> PowerShell Integrated Console <=====`n`n"; + this.editorServicesArgs = `-HostName 'Visual Studio Code Host' ` + `-HostProfileId 'Microsoft.VSCode' ` + `-HostVersion '${this.HostVersion}' ` + `-AdditionalModules @('PowerShellEditorServices.VSCode') ` + `-BundledModulesPath '${PowerShellProcess.escapeSingleQuotes(this.bundledModulesPath)}' ` + + `-StartupBanner "${startupBanner}" ` + `-EnableConsoleRepl `; if (this.sessionSettings.developer.editorServicesWaitForDebugger) { diff --git a/src/settings.ts b/src/settings.ts index d57a9cedf7..99e73266af 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -101,6 +101,7 @@ export interface IIntegratedConsoleSettings { focusConsoleOnExecute?: boolean; useLegacyReadLine?: boolean; forceClearScrollbackBuffer?: boolean; + suppressStartupBanner?: boolean; } export interface ISideBarSettings { From d421409ad5eecf097aa8ad86223494c3de9cc424 Mon Sep 17 00:00:00 2001 From: Rob Holt Date: Fri, 3 Jan 2020 09:49:15 -0800 Subject: [PATCH 2/2] Remove default startup banner setting --- src/session.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/session.ts b/src/session.ts index a217c1451b..63ca5cd18f 100644 --- a/src/session.ts +++ b/src/session.ts @@ -179,19 +179,18 @@ export class SessionManager implements Middleware { } } - const startupBanner = this.sessionSettings.integratedConsole.suppressStartupBanner - ? "" - : "`n`n =====> PowerShell Integrated Console <=====`n`n"; - this.editorServicesArgs = `-HostName 'Visual Studio Code Host' ` + `-HostProfileId 'Microsoft.VSCode' ` + `-HostVersion '${this.HostVersion}' ` + `-AdditionalModules @('PowerShellEditorServices.VSCode') ` + `-BundledModulesPath '${PowerShellProcess.escapeSingleQuotes(this.bundledModulesPath)}' ` + - `-StartupBanner "${startupBanner}" ` + `-EnableConsoleRepl `; + if (this.sessionSettings.integratedConsole.suppressStartupBanner) { + this.editorServicesArgs += "-StartupBanner '' "; + } + if (this.sessionSettings.developer.editorServicesWaitForDebugger) { this.editorServicesArgs += "-WaitForDebugger "; }