Closed edumserrano closed 3 years ago
Tried the poshgit
segment and it displays the info correctly using version 3.134.0
of oh-my-posh. Maybe it's an issue with the git
segment?
Example of poshgit
which displays git status details correctly and git
segment which displays it incorrectly:
@edumserrano can you give me the output of git --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --short --branch
?
@edumserrano would you mind copy-pasting that as text?
@edumserrano I'm sorry but we provide the correct state.??
implies the file is untracked, not "added". That's reserved for A
.
When I do the following, it's first marked as untracked and after adding to the index it changes to added. This is, according to my understanding 100% correct. @dahlbyk any context on why posh-git does this differently?
posh-git splits status between staged/unstaged, so red +2 means there are two untracked files to be added and green +2 (from A
) means two new files have been staged.
Of course I don't mind that this is considered working as expected but I thought it might be something to consider as an improvement since posh-git displays the information in a more sensible way and because up until version 3.12.1-beta
so did the git segment (arguably).
@edumserrano given that we have the same rendering as posh-git, I suggest we align the behaviour.
That was quick! Thanks for picking this up @JanDeDobbeleer. I can confirm the new release shows correctly:
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
When in a git directory some of the symbols are not showing correctly when displaying the git status details.
I've installed several versions of the oh-my-posh powershell module using
Install-Module -Name oh-my-posh -RequiredVersion <specify version> -AllowPrerelease
and found that from version3.4.7-beta
to version3.12.1-beta
this problem does not exist. However after version3.12.1-beta
I couldn't find another version where the problem was fixed.Environment
Steps to Reproduce
Install-Module -Name oh-my-posh -AllowPrerelease
Import-Module oh-my-posh
Set-PoshPrompt -Theme agnoster
Expected behavior: [What you expected to happen]
It should show this:
Notice that the git status details shows correctly with
+2 ~2 -0
The above image was taken using version
3.12.1-beta
of oh-my-posh.Actual behavior: [What actually happened]
I'm getting this:
Notice the
~2 ?2
at the end of the git status detailsThe above image was taken using version
3.134.0
of oh-my-posh.