Closed pfmoore closed 2 years ago
@pfmoore there seems to be something lacking in the docs. You need to set the following environment variable: $env:POSH_GIT_ENABLED = $true
Ah cool, thanks. I did try to check the docs and didn't see that. I found it now, it's under the docs for the "git" (not "poshgit") segment.
Reopening as I will fix that!
Actually, even now that I've set $env:POSH_GIT_ENABLED
it seems to behave weirdly - it always puts the Posh-Git status at the start of the prompt line, instead of where I position it in the template. Is that to be expected?
Also, oh-my-posh debug
still shows it as poshgit(false)
all the time - I guess that may be because it needs fancy integration with the Powershell environment that debug doesn't have, but of so, how do I check whether the performance benefit of using it is worth it over just using the git segment?
I will say that I've just discovered that if I leave fetch_status
at its default of false
, the git
segment is actually plenty fast enough, so I'm probably not going to bother with poshgit
anyway. As a result this is mostly just theoretical to me at this point, so don't spend too much time on it!
@pfmoore make sure to update posh-git as they fixed something in that area. Also, add oh-my-posh before importing posh-git.
Ah! I was importing posh-git first. (I did also have an old version of posh-git, but I'd spotted that and updated it and still had the issue).
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 altered my config to use the poshgit segment in place of git. I have Posh-Git installed and imported in my profile before oh-my-posh. My config has a copy of the default poshgit settings:
If I run
oh-my-posh debug
when in a git checkout, the output shows:I can't find any instructions on how to
Theme
A custom config. To ensure I didn't have an issue with something else in my config, I replaced it with a copy of
jandedobbeleer.omp.json
and just replaced the git section in that with the poshgit section shown above.What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output