fix(pwsh): populate GitStatus correctly

Resolves #2178
This commit is contained in:
Jan De Dobbeleer 2022-04-28 13:59:51 +02:00 committed by Jan De Dobbeleer
parent ae8557882c
commit 49e8725f66

View file

@ -76,7 +76,9 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
function Initialize-ModuleSupport {
if ($env:POSH_GIT_ENABLED -eq $true) {
$env:POSH_GIT_STATUS = Write-GitStatus -Status (Get-GitStatus)
# We need to set the status so posh-git can facilitate autocomplete
$global:GitStatus = Get-GitStatus
$env:POSH_GIT_STATUS = Write-GitStatus -Status $global:GitStatus
}
}