Closed TarekSalha closed 1 year ago
@TarekSalha you're using the out of the box configuration which doesn't have an azure segment. And as you probably don't have the Azure PowerShell module installed, enabling it will indeed break prompt invocation.
You'll need to export and edit the configuration to include the azure segment.
Hi @JanDeDobbeleer,
thanks for your swift answer. Additionally, I also loaded the azure powershell module and now setting the environment params does not break the theme anymore. So far, so good...
Still, I am slightly confused. From the docs, it is said, that if I put this line oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/cloud-native-azure.omp.json' | Invoke-Expression
into my profile, then it will load the specified azure native theme. Why am I still using the out-of-the-box theme as suggested from your answer?
@TarekSalha probably it fails to download the config. You can see that when running oh-my-posh debug --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/cloud-native-azure.omp.json' --shell pwsh
using a local file instead, it works now as expected, thanks for the support!
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Code of Conduct
What happened?
recently, I noticed, that oh my posh is not anymore displaying my active azure subscription properly,
though I am successfully logged in using the latest azure cli version 2.50.0
Using the hint on https://ohmyposh.dev/docs/segments/az even worsens the situation. When I use
$env:POSH_AZURE_ENABLED = $true
in$PROFILE
after initializing the theme, it is displaying anything at all:setting
$env:POSH_AZURE_ENABLED = $false
again brings back the first screenshot.This is my $PROFILE content:
Theme
cloud-native-azure
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output