mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
parent
f7e4661486
commit
f3737cd91d
|
@ -3,6 +3,8 @@ if ($null -ne (Get-Module -Name "oh-my-posh-core")) {
|
||||||
Remove-Module -Name "oh-my-posh-core" -Force
|
Remove-Module -Name "oh-my-posh-core" -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Helper functions which need to be defined before the module is loaded
|
||||||
|
# See https://github.com/JanDeDobbeleer/oh-my-posh/discussions/2300
|
||||||
function Get-PoshStackCount {
|
function Get-PoshStackCount {
|
||||||
$locations = Get-Location -Stack
|
$locations = Get-Location -Stack
|
||||||
if ($locations) {
|
if ($locations) {
|
||||||
|
@ -11,6 +13,9 @@ function Get-PoshStackCount {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# See https://github.com/JanDeDobbeleer/oh-my-posh/discussions/1928
|
||||||
|
function Test-PSDebugContext { return Test-Path Variable:/PSDebugContext }
|
||||||
|
|
||||||
New-Module -Name "oh-my-posh-core" -ScriptBlock {
|
New-Module -Name "oh-my-posh-core" -ScriptBlock {
|
||||||
$script:ErrorCode = 0
|
$script:ErrorCode = 0
|
||||||
$script:OMPExecutable = '::OMP::'
|
$script:OMPExecutable = '::OMP::'
|
||||||
|
@ -312,5 +317,3 @@ Example:
|
||||||
"prompt"
|
"prompt"
|
||||||
)
|
)
|
||||||
} | Import-Module -Global
|
} | Import-Module -Global
|
||||||
|
|
||||||
function Test-PSDebugContext { return Test-Path Variable:/PSDebugContext }
|
|
||||||
|
|
Loading…
Reference in a new issue