Upgrade segment not displaying .Current and .Latest values - unlock segment to freely show values if desired #7038
Unanswered
MoonlightXXIX
asked this question in
Troubleshoot
Replies: 1 comment 1 reply
-
|
This is by design, I can adjust it though. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
I want to display both the current and latest version of oh my posh - regardless if they match or if there is no newer version.
My understanding from the documentation and my tests, is that it only displays if there is a newer version:
https://ohmyposh.dev/docs/segments/system/upgrade
However, I want to display it like this, where Current version is always displayed, and only IF there is a new version available will it show the Latest version you can upgrade to:
If I were to mimic this is plain text, I want this output. Where the first one is current version, when no newer version is available (i.e. it matches latest). And the second one is when a newer version is available, i.e. doesn't match latest:

It would be good for this segment to be flexible rather than only show if a new version is available. I'm not sure the intention behind it being locked down or if I'm doing something wrong here?
I also tried to just get .Current but its not displaying, not sure if this is a bug or something wrong with my config.
All I can do currently is:
i.e. using the Global variable to just get the current installed version.
I tried a plain template, just to see if anything is getting returned:
But this isn't returning anything. When I debug it, I can see the versions:
[DEBUG] 00:12:12.119 store.go:]:150 → (device) found entry: upgrade_segment - &{28.2.1 28.2.1}Assuming entry 1 is current and entry 2 is latest maybe?
I also tried .Latest but I don't get any result with that either.
Any feedback on this or am I just doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions