Closed wrecklass closed 1 month ago
@wrecklass what does Write-Host $error
say?
PS> write-host $Error System.Management.Automation.CommandNotFoundException: The term 'Get-AzContext' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) at Microsoft.PowerShell.Executor.ExecuteCommandHelper(Pipeline tempPipeline, Exception& exceptionThrown, ExecutionOptions options) The term 'Get-AzContext' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
So, with that hint, I removed the Azure portion of my config script for OMP. Turns out that fixes the issue. Although it just seems like a work around. Did you make a change about how Azure contexts are handled recently?
~@wrecklass What is the output of the following command in PowerShell v7.4.4 with the az
segment available in your OMP theme?~ (No longer applicable.)
Did you make a change about how Azure contexts are handled recently?
Yes, it now enables by itself when you set "source": "pwsh" | "first_match"
. I did forget to update the docs on that specifically, but that shouldn't change the fact that using the az
segment with those settings expects Get-AzContext
to run or it doesn't work.
Code of Conduct
What happened?
oh-my-posh prompt is no longer displayed on Powershell 7.4.4. I believe it was still working on 7.4.3, but it's possible the problem is older than 7.4.2.
Here is the PowerShell startup screen:
PowerShell 7.4.4
✅ no new version available
Loading personal and system profiles took 1939ms. PS> dir $env:POSH_THEME
Mode LastWriteTime Length Name
-a--- 7/7/2024 2:13 PM 16611 config.omp.json
PS>
What do you expect? I expect to see the formatted oh-my-posh prompt instead of 'PS> ' prompt. Which I believe is just the PowerShell default Prompt.
I can test and see the correct prompt with the command: PS> oh-my-posh.exe prompt print primary ╭─ ENTERPRISE 0ms⠀ pwsh 21% 14:37:42 ╰─
Theme
Any theme does not work.
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output