fix: multiline prompt rendering

resolves #354
This commit is contained in:
Jan De Dobbeleer 2021-01-18 11:16:31 +01:00
parent edebc1d465
commit f6501aeb51

View file

@ -47,7 +47,8 @@ function global:Set-PoshGitStatus {
$standardOut = @(&$omp "--config=$config" "--error=$errorCode" "--pwd=$cleanPWD" "--pswd=$cleanPSWD" "--execution-time=$executionTime") $standardOut = @(&$omp "--config=$config" "--error=$errorCode" "--pwd=$cleanPWD" "--pswd=$cleanPSWD" "--execution-time=$executionTime")
# Restore initial encoding # Restore initial encoding
[Console]::OutputEncoding = $originalOutputEncoding [Console]::OutputEncoding = $originalOutputEncoding
$standardOut # the ouput can be multiline, joining these ensures proper rendering by adding line breaks with `n
$standardOut -join "`n"
Set-PoshGitStatus Set-PoshGitStatus
$global:LASTEXITCODE = $realLASTEXITCODE $global:LASTEXITCODE = $realLASTEXITCODE
#remove temp variables #remove temp variables