fix(pwsh): rename general variables

resolves #1148
This commit is contained in:
Jan De Dobbeleer 2021-11-01 23:54:15 +02:00 committed by Jan De Dobbeleer
parent df52ccdb6a
commit d328c81932

View file

@ -13,12 +13,12 @@ $env:POWERLINE_COMMAND = "oh-my-posh"
$env:CONDA_PROMPT_MODIFIER = $false
# specific module support (disabled by default)
$value = $env:AZ_ENABLED
if ($null -eq $value) {
$omp_value = $env:AZ_ENABLED
if ($null -eq $omp_value) {
$env:AZ_ENABLED = $false
}
$value = $env:POSH_GIT_ENABLED
if ($null -eq $value) {
$omp_value = $env:POSH_GIT_ENABLED
if ($null -eq $omp_value) {
$env:POSH_GIT_ENABLED = $false
}
@ -30,11 +30,14 @@ $global:PoshSettings = New-Object -TypeName PSObject -Property @{
# used to detect empty hit
$global:omp_lastHistoryId = -1
$config = "::CONFIG::"
if (Test-Path $config) {
$global:PoshSettings.Theme = (Resolve-Path -Path $config).ProviderPath
$omp_config = "::CONFIG::"
if (Test-Path $omp_config) {
$global:PoshSettings.Theme = (Resolve-Path -Path $omp_config).ProviderPath
}
Remove-Variable $omp_value -Confirm:$false
Remove-Variable $omp_config -Confirm:$false
function global:Set-PoshContext {}
function global:Get-PoshContext {