fix(pwsh): support additional debug prompt scenarios

This commit is contained in:
Justin Grote 2022-11-16 21:21:25 -08:00 committed by GitHub
parent 54672cefdf
commit a17ea7b989
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -292,7 +292,7 @@ Example:
# for details about the trick to detect a debugging context, see these comments:
# 1) https://github.com/JanDeDobbeleer/oh-my-posh/issues/2483#issuecomment-1175761456
# 2) https://github.com/JanDeDobbeleer/oh-my-posh/issues/2502#issuecomment-1179968052
if (-not ((Get-PSCallStack).Location -join "").StartsWith("<")) {
if ($null -ne $PSDebugContext -or -not ((Get-PSCallStack).Location -join "").StartsWith("<")) {
$script:PromptType = "debug"
return
}