Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbled output when typing "git gui" #738

Closed
patrikhuber opened this issue Feb 15, 2020 · 3 comments
Closed

Garbled output when typing "git gui" #738

patrikhuber opened this issue Feb 15, 2020 · 3 comments

Comments

@patrikhuber
Copy link

patrikhuber commented Feb 15, 2020

System Details

  • posh-git version/path: 1.0.0 beta3 ~\Documents\PowerShell\Modules\posh-git\1.0.0
  • PowerShell version: 6.2.4
  • git version 2.25.0.windows.1
  • OS: Microsoft Windows NT 10.0.18362.0

Issue Description

posh-git seems to work fine overall. However when typing git gui, the git gui window opens, but on the powershell prompt, the encoding of the characters is outputted and the cursor stays on that line. Only after pressing "Enter", the prompt becomes "normal" again.

~\MyProj [mybranch +2 ~2 -0 !]> git gui    <-- nicely colourised
~\MyProj �[93m[�[0m�[96mmybranch�[0m�[31m�[49m +2�[0m�[31m�[49m ~2�[0m�[31m�[49m -0�[0m�[31m !�[0m�[93m]�[0m>    <-- no colours, "weird" output. Have to press "enter" to get prompt to normal again.
~\MyProj [mybranch +2 ~2 -0 !]>    <-- nicely colourised

image

@dahlbyk
Copy link
Owner

dahlbyk commented Mar 14, 2020

Fascinating. Closing here, as it seems not to be posh-git specific: microsoft/terminal#4809.

Probably something that needs to be fixed in git gui?

@patrikhuber
Copy link
Author

Thanks, I don't know how these things interact but I've followed your advise and opened prati0100/git-gui#34.

@dahlbyk
Copy link
Owner

dahlbyk commented Mar 14, 2020

Quite the conclusion:

Unfortunately, there isn't anything powershell (or the windows console!) can do to help this situation: the input mode is console-wide global state, and sh.exe is setting that global state to ignore powershell's text rendering commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants