mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
parent
36d58d46ad
commit
aa36303962
|
@ -26,6 +26,12 @@ if (!$IsWindows) {
|
||||||
|
|
||||||
function Set-PoshContext {}
|
function Set-PoshContext {}
|
||||||
|
|
||||||
|
function Set-GitStatus {
|
||||||
|
if (Get-Command -Name "Get-GitStatus" -ErrorAction SilentlyContinue) {
|
||||||
|
$Global:GitStatus = Get-GitStatus
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Set-PoshPrompt {
|
function Set-PoshPrompt {
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory = $false)]
|
[Parameter(Mandatory = $false)]
|
||||||
|
@ -70,6 +76,7 @@ function Set-PoshPrompt {
|
||||||
$standardOut
|
$standardOut
|
||||||
$global:LASTEXITCODE = $realLASTEXITCODE
|
$global:LASTEXITCODE = $realLASTEXITCODE
|
||||||
Remove-Variable realLASTEXITCODE -Confirm:$false
|
Remove-Variable realLASTEXITCODE -Confirm:$false
|
||||||
|
Set-GitStatus
|
||||||
}
|
}
|
||||||
Set-Item -Path Function:prompt -Value $Prompt -Force
|
Set-Item -Path Function:prompt -Value $Prompt -Force
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue