I have a custom prompt in my profile.
function prompt {
$p = Split-Path -leaf -path (Get-Location)
"$p> "
}
But when I am debugging a script, I noticed the prompt in suspended mode doesn’t have the telltale ‘>>’ I normally see on an non-customized session’s prompt.
PS C:\windows> function testtest () {
>> $DebugPreference = 'inquire'
>> Write-Debug "test"
>> }
>>
PS C:\windows> testtest -debug
DEBUG: test
Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): s
PS C:\windows>>
How would I change my custom prompt to account for this (and any other) case where the prompt is altered for the user?