oh my zsh showing weird character '?' on terminal
Asked Answered
P

6

88

I have installed iTerm2 and Oh-my-zsh. However there is a weird question mark that is coming ever since I have changed ZSH-THEME to "agnoster".

Attaching the screenshot for the same.

check the question mark on terminal pointer

I thought powerline would help but that doesn't seem to happen. Can can anyone help me with this?

Pulsimeter answered 16/2, 2017 at 10:45 Comment(8)
Have you installed powerline fonts?Ewart
yes I have installed powerline fontsPulsimeter
And have you pointed your iTerm to use that font? I suppose you were following this tutorial ? gist.github.com/kevin-smets/8568070Ewart
yes, I was following this tutorial, but I am unable to point iterm to fonts!Pulsimeter
What exactly are you unable to do ? You can't find the font in the list ? You can't find the window where to change it ?Ewart
I tried doing this : iterm2 > preferences > profiles > text Regular font & non ASCII font. But I could not find non ASCII fontPulsimeter
solved! point 6 of this article coderwall.com/p/yiot4q/…Pulsimeter
Added this as answer to the question, easier for future searches.Ewart
I
70

This has fixed the issue. Just select Use built-in Powerline glyphs and use Inconsolata for Powerline font.

This has fixed the issues.

Isotope answered 29/11, 2019 at 10:45 Comment(2)
This worked for me, but one extra thing I had to do was to apply these changes to not just the default profile in iterm2, but also my user-specific profile ("jeff")Marika
This worked to me just selecting "Use built-in Poweline glyphs". ThanksRobbegrillet
R
60

Installing a powerline patched font will solve this. This official documentation provides description about installing poweline fonts.

There are two ways to enable powerline patched font in iTerm2.

  1. Set a powerline patched font as default.

One defauls font

  1. Set a powerline patched font for only Non-ASCII characters and use another font for code.

Different fonts

Bonus:

Rosaceous answered 20/2, 2017 at 19:46 Comment(0)
A
17

Just do the following, it worked for me, trust me, see the truth in my eyes.

Go to preference->Profiles->Test and look at the following figure:- enter image description here

Antonina answered 6/7, 2021 at 14:58 Comment(0)
S
7

On Windows - just * download some Powerline font like: https://github.com/abertsch/Menlo-for-Powerline/raw/master/Menlo%20for%20Powerline.ttf
* Install it by clicking the file twice
* Choose the new font in properties
That's it!

On Mac - the previous answer in totally correct, just install and choose an appropriate font.

Shockey answered 16/10, 2017 at 13:28 Comment(0)
C
1

I fixed this by Going to iTerm2->Settings->Profiles->Text and enabling "Use built-in Powerline glyphs". That fixed the seperators but not the icons.

The icons were fixed by changing to a font that support them. Such as those listed here: https://github.com/powerline/fonts

I already had one installed called "FuraCode Nerd Font" but think this might have been renamed to "Fira Code" or something not quite sure. But you need to have a font that supports the icons.

Cancel answered 8/1 at 15:20 Comment(0)
P
0

This answer relates to a similar problem I encountered but for the oh-my-posh application on Windows 10 Pro.

For others who might be wrestling with this, I also was having issues where the font would create tiny boxes with question marks. Turns out it was because my version of Windows 10 Pro was not activated. I found this out by trying to search for Fonts in the settings, and was unable to search for any of the Nerd Fonts I thought I had downloaded. Activating Windows 10 Pro fixed the problem as soon as I reloaded.

Petulance answered 4/5, 2022 at 22:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.