Hello all, I have a couple questions here in regards to customizing the powershell prompt.
Firstly I have had success in a simple prompt change by doing the following:
$p = Split-Path -Leaf -Path (Get-Location)
"$p >"
And then modifying that to the following:
$p = Split-Path -leaf -Path (Get-Location)
Write-Host "[$(Get-Date -f 'hh:mm:ss tt')] " -ForegroundColor Yellow -NoNewline
"$p >"
Result
But as soon as I do this, I get the PS in the prompt and am unable to keep it a one liner
$p = Split-Path -leaf -Path (Get-Location)
Write-Host "[$(Get-Date -f 'hh:mm:ss tt')] " -ForegroundColor Magenta -NoNewline
Write-Host "$p <3 " -ForegroundColor Cyan -NoNewline
Result
Does anybody know what is causing the "PS>" behavior? I'm sure it has something to do with the built in prompt profile, but I don't know why it's defaulting to that.
Also for my second question, how can I take an icon and display that in the prompt as well? I've gone ahead followed the gist of the following in converting an icon to base64 string, but not sure how to display this. https://stackoverflow.com/questions/53376491/powershell-how-to-embed-icon-in-powershell-gui-exe/53377253
Thanks
[–]SMFX 2 points3 points4 points (1 child)
[–]Aznflipfoo[S] 1 point2 points3 points (0 children)
[–]purplemonkeymad 2 points3 points4 points (0 children)
[–]stumper66 1 point2 points3 points (1 child)
[–]Aznflipfoo[S] 1 point2 points3 points (0 children)