bash-git-prompt icon indicating copy to clipboard operation
bash-git-prompt copied to clipboard

The second part of the git prompt is not being displayed properly

Open PeriGK opened this issue 8 years ago • 9 comments

Hi,

I think this is quite easy, but I am not really sure what is missing. My prompt is shown like:

[master|���]

How can I eliminate those symbols on the right? This is only reproducible in Guake terminal. Others, like MATE terminal work fine.

Thanks, P.

PeriGK avatar Jun 25 '17 10:06 PeriGK

It seems, that the guake terminal cannot display UTF8 characters correctly. You could try to create a new theme, with different characters as symbols and set it conditionally whether you are on the Guake terminal or not.

see also https://github.com/Guake/guake/issues/877

magicmonty avatar Jun 26 '17 06:06 magicmonty

I have the same issue but I'm running in (CentOS v7.5) Gnome where I've modified the font family to one I prefer that's easier on my eyes. Is there a standard font family that bash-git-prompt is originally designed with as a default? I was thinking that I'd simply change the font family in the prompt using the GIT_PROMPT_START and GIT_PROMPT_END variables so that all the special characters display correctly in the prompt where they typically appear.

GrayCatCode avatar Sep 05 '18 18:09 GrayCatCode

Here's a screenshot of what the prompt is now displaying for me ... I'm at a loss to know how to resolve it and restore the appropriate settings so it works correctly:

image

GrayCatCode avatar Sep 05 '18 22:09 GrayCatCode

That still looks a lot like your terminal or your font doesn't support UTF8 characters.

magicmonty avatar Sep 06 '18 03:09 magicmonty

I would tend agree with you; I've reset Gnome and changed to a monospace font and it still renders that way.

GrayCatCode avatar Sep 06 '18 17:09 GrayCatCode

I'm actually running that in Terminator and I have the Terminator Preferences set to UTF-8:

image

I still get that character issue even in standard bash terminal. It has to be a Gnome font setting issue.

GrayCatCode avatar Sep 11 '18 18:09 GrayCatCode

I was able to fix the issue by installing the following Deja Vu font RPMs on my CentOS v7 (centos-release-7-5.1804.4.el7.centos.x86_64) server:

dejavu-fonts-common.noarch 2.33-6.el7 dejavu-sans-fonts.noarch 2.33-6.el7 dejavu-sans-mono-fonts.noarch 2.33-6.el7 dejavu-serif-fonts.noarch 2.33-6.el7

That said, the prompt worked prior to me doing this, but apparently manipulating the fonts on the server broke whatever was initially making it work. At this point I'm just glad I got it back to a working state. :+1:

GrayCatCode avatar Sep 19 '18 22:09 GrayCatCode

@Andrew-Poloni So we can close this issue?

magicmonty avatar Oct 01 '18 11:10 magicmonty

Digging up a zombie issue:

If there are two people on the same CentOS7 server and one has this problem while the other doesn't and neither can install fonts, is there something else that can be looked into?

fastzombies avatar May 08 '20 23:05 fastzombies