Skip to content

Commit

Permalink
Hide the welcome message on pwsh
Browse files Browse the repository at this point in the history
Part of #141483
  • Loading branch information
Tyriar committed Feb 4, 2022
1 parent f9614ce commit 2fdb11b
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------------------------------------------------------

param(
[Parameter(HelpMessage="Hides the shell integration welcome message")]
[switch] $HideWelcome = $False
)

$Global:__VSCodeOriginalPrompt = $function:Prompt

function Global:__VSCode-Get-LastExitCode {
Expand Down Expand Up @@ -51,4 +56,8 @@ function Global:PSConsoleHostReadLine {

# Set IsWindows property
[Console]::Write("`e]633;P;IsWindows=$($IsWindows)`a")
Write-Host "`e[1mShell integration activated!" -ForegroundColor Green

# Show the welcome message
if ($HideWelcome -eq $False) {
Write-Host "`e[1mShell integration activated!" -ForegroundColor Green
}

0 comments on commit 2fdb11b

Please sign in to comment.