Closed floushee closed 1 year ago
@floushee doe you have $env:POSH_AZURE_ENABLED = $true
set in your $PROFILE
after initialising oh-my-posh? See here.
Yes, here is the part of my $PROFILE:
oh-my-posh --init --shell pwsh --config "...." | Invoke-Expression
$env:POSH_AZURE_ENABLED = $true
Any other ideas? Anything how I could trigger more logs or something?
What interests me is, that although I have set source to be pwsh it still tries to run the az command.
@floushee what version of oh-my-posh are you on? Could be "old".
Cool thanks. That did the trick. I updated my powershell modules and thought that that might upgrade oh my posh too :)
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?
I have the following prompt config:
When I run the debug mode it gives me the following error:
It looks like the source property is ignored because it is still trying to use the Azure CLI to get the information? I do have the Azure CLI installed but there is not a exe as it is python based (only have a az.cmd).
I tried to upgrade everything to the latest versions and it also did not fix the issue. Any ideas?
Theme
{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { "alignment": "left", "segments": [ { "background": "#222725", "foreground": "#ffffff", "leading_diamond": "\ue0b6", "powerline_symbol": "\ue0b0", "properties": { "style": "folder" }, "style": "diamond", "template": " \ue5ff {{ .Path }} ", "trailing_diamond": "\ue0b0", "type": "path" }, { "background": "#E09F3E", "foreground": "#ffffff", "powerline_symbol": "\ue0b0", "properties": { "fetch_stash_count": true, "fetch_status": true, "fetch_upstream_icon": true }, "style": "powerline", "template": " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} ", "type": "git" }, { "background": "#15846E", "foreground": "#ffffff", "powerline_symbol": "\ue0b0", "properties": { "fetch_version": true }, "style": "powerline", "template": " \ue70c {{ if .Unsupported }}\uf071{{ else }}{{ .Full }}{{ end }} ", "type": "dotnet" } ], "type": "prompt" }, { "type": "rprompt", "alignment": "right", "segments": [ { "background": "#000000", "foreground": "#929292", "powerline_symbol": "\ue0b0", "properties": { "display_id": true, "display_name": true, "info_separator": " @ ", "source": "first_match" }, "style": "diamond", "template": " \uFD03 {{ .Name }}", "type": "az" } ] } ], "final_space": true, "version": 2 }
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output