diff --git a/src/shell/scripts/omp.ps1 b/src/shell/scripts/omp.ps1 index d678b28d..622c7d2c 100644 --- a/src/shell/scripts/omp.ps1 +++ b/src/shell/scripts/omp.ps1 @@ -117,7 +117,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock { } } - if ("::TRANSIENT::" -eq "true") { + if (("::TRANSIENT::" -eq "true") -and ($ExecutionContext.SessionState.LanguageMode -ne "ConstrainedLanguage")) { Set-PSReadLineKeyHandler -Key Enter -BriefDescription 'OhMyPoshEnterKeyHandler' -ScriptBlock { $previousOutputEncoding = [Console]::OutputEncoding try {