Open KnownAsDon opened 5 years ago
I'm also having a similar issue. Note that I'm using Gnome Terminal 3.28.2
on Ubuntu 18.04 LTS
.
All of the icons appear to show up correctly, except that I get that circle/dot icon instead of the +- icon when a file is edited in my current git repo.
I'm having the same issue as well after just switching to the agnoster theme.
Where exactly did you download the patched Powerline fonts from? There are two versions of them, and you need to make sure you're using the new version of them. (At one point, they changed which private-use Unicode code points they use for the icons; all the current theme code should be using the new code points.)
I think that https://github.com/powerline/fonts/releases/tag/2015-12-04 will get you the right set.
I have had the Fira Code fonts installed from here on my machine for a while, so I figured I wouldn't have any issues since FiraMono is in the Powerline fonts list.
I actually ran the check documented in the readme and got the expected result for all the characters (including +-). It's just that for whatever reason the +- icon results in a dot in my prompt.
Hmmm. Okay, if you did the check in the README and it worked, then it seems to me like it ought to be working, and I don't know what's going on. Sorry.
I'm afraid I cannot reproduce. I'm running an Ubuntu 18.04 VM (under VMware on macOS 10.14) with a pretty fresh Ubuntu install. I did a fresh install of agnoster (by just cloning the repo) and a fresh install of the Powerline-patched fonts by downloading them from https://github.com/powerline/fonts/releases/tag/2015-12-04 and running the install.sh
script inside them. Switched to Meslo LG M for Powerline in Gnome Terminal, loaded Agnoster, and it worked fine; I see the +- in my prompt.
@bellizio and @jwir3: Here's an idea. The Agnoster theme code gets that +- symbol from the (global) shell variable $PLUSMINUS
, which is initialized upon loading agnoster.zsh-theme
here, but is re-evaluated each time the prompt is displayed. (I think that's intentional, to allow users to customize their symbols.) Is it possible that something else in your zsh environment/code is setting and clobbering $PLUSMINUS
?
What happens if you do this?
echo "char: \u00b1 PLUSMINUS: $PLUSMINUS"
It should look like this:
If you get two different symbols, then you've probably got a variable-clobbering problem going on.
@KnownAsDon: What terminal emulator (and version) are you running, and what are your locale
settings? Is your terminal set to display Unicode? That screenshot looks like the multibyte Unicode characters used for the Powerline symbols are getting misinterpreted as multiple, fewer-bytes characters.
@apjanke thanks for digging in further and the info about the shell variable.
So I ran echo "char: \u00b1 PLUSMINUS: $PLUSMINUS"
and here's what I got:
Notice there's no value for $PLUSMINUS. To troubleshoot more, I even tried other powerline fonts like Meslo LG M for Powerline and still got the same result. I'm not sure what's causing it at this point.
Bazinga! You've got something in your other zsh configuration code (maybe prompt setup) that is stomping on the $PLUSMINUS
variable and breaking Agnoster. (This could partly be considered Agnoster's fault for not prefixing all its variables with $AGN_
or something. They're globals!) This is not an Agnoster problem, but I'll try to help you figure it out anyway.
This is totally not a font or terminal configuration problem; don't bother messing with them any more.
What other zsh stuff are you running? Oh My Zsh? Prezto? Any other themes?
What's in your ~/.zshrc
? Can you share your dotfiles with us? (E.g. I've got all mine up at https://github.com/apjanke/dotfiles.)
@apjanke that's what I was thinking after you pointed it out.
I am running Oh My Zsh. Here's my .zshrc file.
Welp. Nothing suspicious in your .zshrc
. And I don't see anything in Oh My Zsh that affects $PLUSMINUS
.
But here's the thing: since you're loading Oh My Zsh, and setting ZSH_THEME="agnoster"
there, I think you're actually pulling in Oh My Zsh's fork of the Agnoster theme, which has diverged significantly, and not the code in this repo. Maybe head over there and ask the same question?
@apjanke bingo, that's it. Looked at the ohmyzsh version of the theme and noticed there is no PLUSMINUS
variable set.
So I took the agnoster theme straight from this repo, added it to the /.oh-my-zsh/custom/themes
folder, and voila! I now have the +- showing up.
Great!
@bellizio Did you report this as an issue with Oh My Zsh? Your solution fixed my issue, so I thought it might be worth reporting it to them so they can fix it/back merge from their end.
@apjanke @jwir3 @KnownAsDon I have opened an issue in the ohmysh repo here.
I have this problem in agnoster theme, I'm using windows wsl with ubuntu 20.04.6.
It is not working as it should in native linux
@marviniciuz I got mine working by using Fira Code
. When you get the font installed, open Ubuntu, then right-click on WSL top panel
> Properties
> Font
tab > under Font
, select Fira Code
.
After deciding to switch to agnoster theme after using robbyrussell for quite a while now I saw this bug with the powerline icons.
I installed manually the patched powerline fonts from the github repo. I am using vanilla arch linux with i3wm. Any help would be greatly appreciated.