Closed skycommand closed 3 years ago
@skycommand it does not say the remote is in sync, status is disabled for that config (it is for slimfat). If you want it, create a custom theme and override that part in the git segment: "display_status": true
. The reason is that status can take a significant amount of time in certain repositories severely impacting performance.
@JanDeDobbeleer Okay, I did not expect that at all.
I need to candidly ask you a question: Is there any of the oh-my-posh 2 features that oh-my-posh 3 provides out-of-the-box?
@skycommand do you mean with the standard themes? Because those are made for convenience, not tailored for the actual hardcore user. It's pretty straightforward to create a custom theme you can share/use anywhere and tweak 100% to your liking/use cases. That part is a lot easier compared to V2, which was limited to people understanding Powershell and even then, didn't offer a lot of plug and play.
@JanDeDobbeleer, many of the default templates use the git segment, but only a handful have enabled the status via the "display_status": true
option. Could we either enable this for the default templates or remove the git segment from any template that does not enable the status? After updating oh-my-posh
I started seeing only the git SHA in my prompt themes. I believed this to be a bug since this wasn't listed as a breaking change in the release notes.
@tom-mckinney I get your point but we've seen many people having issues with large repos and thus git being slow due to status. What's important to understand, and a key difference when coming from V2, is that the current themes serve more as examples rather than full blown configs to serve every use-case. It's pretty straightforward to create your own enabling every possible feature you'd like and tailoring the experience (which is guaranteed to be compatible). I could've made that change introduce the 4.x version, but we would in all honesty be having the same conversation.
The SHA is another issue to be honest, that would imply git branch --show-current
doesn't return a value. Can you validate and make sure you're on the latest version of git?
@JanDeDobbeleer, you're absolutely right! I updated git to 2.31.1
and now it's working. Please disregard my previous request—now that it's showing the branch rather than the SHA, the git segment is useful again 😄
Could we update the docs for the git segment to include this requirement?
@JanDeDobbeleer having the same issue, status remains same(as below),
Sorry had to reupload photo, as I exposed my system info before
3.162.1
2.31.1.windows.1
winget
5.1.19041.1023
7.1.3
Used to work fine initially(as I installed first 3.149.x), had a custom variation of paradox
theme. After the first update it stopped working, first I thought it was not compatible with my custom theme so I switched to provided paradox one. Didn't resolved the issue. So I kept on updating versions hoping that would resolve the issue. Now, I did some extensive testing and nothing seems to be working, it may be due to updating the package/module/app or something else
@muhammad-usman-anwar just like the sample, set "display_status": true
in your git segment.
@JanDeDobbeleer thnx
I'm sorry for being so dumb, but I too am having the same problem. The theme was working before updating posh - and now it isn't. Could you please post the complete instructions for updating the Agnoster theme to include the git status like it was before it was removed?
I've installed posh via the powershell Install-Module
method.
My complete $PROFILE is:
Import-Module oh-my-posh
Set-PoshPrompt -Theme agnosterplus
Import-Module Terminal-Icons
Thanks!
@DWAK-ATTK checkout the documentation https://ohmyposh.dev/docs/git
@DWAK-ATTK you can follow the guide to export your current theme and adjust it so it displays the status.
@JanDeDobbeleer Just a quick heads up that both your link and @muhammad-usman-anwar’s are currently 404.
@aral you can find that guide here now. Also updated above.
Thanks @JanDeDobbeleer. Figured it out yesterday based in another of your replies but just wanted to give a heads up about the docs site being down. Take care + hope you’re having a good week so far.
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.
Prerequisites
CONTRIBUTING
guideDescription
Hello.
I've just installed oh-my-posh 3.158.3 and I feel most of its themes don't display the Git status properly. (I tried searching this repo's issues, and the only one that came up was #731, which is not relevant enough. So, I'm opening this new issue.)
I initialize my environment with these commands:
My prompt looks like this:
It says I have one pending change.
So far so good. I continue by setting the
slimfat
theme.My prompt looks like this:
It says I have one pending change.
Again, so far so good. Here is where the problem starts: I set the
Agnoster
theme.Actual behavior: My prompt looks like this:
It says my local repo is in sync with my remote repo, which is not correct.
Expected behavior: My prompt must indicate that I have pending changes. Here is how the Agnoster theme from oh-my-posh 2 showed it:![Agnoster from version 2, with Posh-Git](https://user-images.githubusercontent.com/17097175/119998601-19bafc00-bfe6-11eb-9801-17d7d4601397.png)
Environment