From 1b4a98cd339bc263af5bd7dbfbc33526dbd2d959 Mon Sep 17 00:00:00 2001 From: Xe Date: Wed, 22 Dec 2021 13:04:40 -0500 Subject: [PATCH] make powershell a single line Signed-off-by: Xe --- common/home-manager/powershell/profile.ps1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/home-manager/powershell/profile.ps1 b/common/home-manager/powershell/profile.ps1 index 8e2745d..dcd4922 100644 --- a/common/home-manager/powershell/profile.ps1 +++ b/common/home-manager/powershell/profile.ps1 @@ -1,7 +1,8 @@ if (Get-InstalledModule -Name posh-git) { Import-Module posh-git -} +} else { + Write-Output "Installing prompt... (this may take a moment)" Set-PSRepository -name PSGallery -InstallationPolicy Trusted Install-Module posh-git -Scope CurrentUser -Force -Repository PSGallery Import-Module posh-git @@ -9,7 +10,6 @@ else { $GitPromptSettings.DefaultPromptPrefix.ForegroundColor = [ConsoleColor]::Magenta $GitPromptSettings.DefaultPromptPath.ForegroundColor = [ConsoleColor]::Orange -$GitPromptSettings.DefaultPromptBeforeSuffix.Text = '`n' function global:PromptWriteErrorInfo() { if ($global:GitPromptValues.DollarQuestion) { return } @@ -21,5 +21,3 @@ function global:PromptWriteErrorInfo() { "`e[31m! `e[0m" } } - -$global:GitPromptSettings.DefaultPromptBeforeSuffix.Text = '`n$(PromptWriteErrorInfo)'