Azure subscription shown twice after changing from "properties" to "options" #7212
Unanswered
Marc013
asked this question in
Troubleshoot
Replies: 2 comments
-
|
@Marc013 you need to upgrade oh-my-posh as the output shows it's still expecting properties and not options, which is why it defaults to |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
It turned out that I had installed both the user and admin versions of Oh-My-Posh. Consequently, winget was unable to update to the latest version ( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Code of Conduct
What happened?
In my custom theme I got the message segment
propertiesis deprecated and should be replaced with segmentoptions.I implemented the following changes (kept the old for reference)
{ "background": "#0674fa", "foreground": "#000000", "leading_diamond": "<transparent,#0674fa>\ue0b0</>", // "properties": { // "source": "pwsh" // }, "options": { "source": "pwsh" }, "style": "diamond", "template": " \uebd8 {{ .Name }} [{{ .Origin }}] ", "trailing_diamond": "\ue0b0", "type": "az" }, { "background": "#0674fa", "foreground": "#000000", "leading_diamond": "<transparent,#0674fa>\ue0b0</>", // "properties": { // "source": "cli" // }, "options": { "source": "cli" }, "style": "diamond", "template": " \uebd8 {{ .Name }} [{{ .Origin }}] ", "trailing_diamond": "\ue0b0", "type": "az" },This change now results in two segments showing that I am signed in to Azure via PowerShell.
When I also log in to Azure using the Azure CLI as well, the PowerShell segment disappears and is replaced by two CLI segments.
After reverting the changes it works again as expected.
Theme
My custom theme (marc013.omp.json):
{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "version": 4, "blocks": [ { "type": "prompt", "alignment": "left", "newline": true, "segments": [ { "foreground": "#FFEE58", "style": "plain", "template": " \uf0e7 ", "type": "root" }, { "foreground": "#FF5252", // "properties": { // "always_enabled": false // }, "options": { "always_enabled": false }, "style": "plain", "template": "\uea87 ", "type": "status" }, { "background": "#0674fa", "foreground": "#000000", "leading_diamond": "<transparent,#0674fa>\ue0b0</>", // "properties": { // "source": "pwsh" // }, "options": { "source": "pwsh" }, "style": "diamond", "template": " \uebd8 {{ .Name }} [{{ .Origin }}] ", "trailing_diamond": "\ue0b0", "type": "az" }, { "background": "#0674fa", "foreground": "#000000", "leading_diamond": "<transparent,#0674fa>\ue0b0</>", // "properties": { // "source": "cli" // }, "options": { "source": "cli" }, "style": "diamond", "template": " \uebd8 {{ .Name }} [{{ .Origin }}] ", "trailing_diamond": "\ue0b0", "type": "az" }, { "background": "#8E24AA", "foreground": "#ffffff", "powerline_symbol": "\ue0b0", "properties": { "style": "folder" }, "style": "powerline", "template": " {{ .Path }} ", "type": "path" }, { "background": "#4CAF50", "foreground": "#193549", "powerline_symbol": "\ue0b0", "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", "source": "pwsh" }, { "background": "#906CFF", "foreground": "#100e23", "powerline_symbol": "\ue0b0", "style": "powerline", "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} ", "type": "python" } ] }, { "type": "prompt", "alignment": "left", "newline": true, "segments": [ { "foreground": "#ffffff", "properties": { "always_enabled": true }, "style": "plain", "template": "\u276f ", "type": "status" } ] } ] }What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output
Beta Was this translation helpful? Give feedback.
All reactions