1

I recently set up my iTerm and have been really enjoying how smooth and functional it is out of the box. I installed the Prezto zsh pre-config and set up Powerlevel10k as my Prezto theme. I also use solarized dark with Inconsolata for Powerline and Menlo for Powerline as my font, both of which have this issue.

When I cd to my root director (cd /), I see an odd question mark box on my powerline. I also see the same box when I activate my virtualenv in a python code directory.

Below is a picture of this happening with the root directory. When I activate the virtualenv, the same thing happens but ON THE RIGHT SIDE beside an indicator with my project name that comes up when virtualenv is activated. What do the question marks mean? What is failing to display? I have no idea what is going on and would appreciate help in troubleshooting.

enter image description here

2

What your screenshot shows is Zsh prompt defined by Powerlevel10k. Powerlevel10k is flexible w.r.t. what symbols it uses to communicate information. As long as it knows the capabilities of your terminal and font, it'll stick to symbols that can be rendered correctly. On the screenshot Powerlevel10k displays a question mark because it thinks your terminal can display it. This usually happens when you configure Powerlevel10k in one terminal with one font, and then use the same config either in a different terminal or with a different font.

Whenever you change your terminal or terminal font, you need to run p10k configure. If you aren't yet using the recommended font, the configuration wizard will ask whether you want to install it. For best experience, say "Yes", restart iTerm2 when prompted and then run p10k configure again. You may, however, refuse to install the font and proceed with prompt configuration. Powerlevel10k will still work but the choice of prompt styles will be limited if your current font isn't very capable.

| improve this answer | |
1

The question mark in a box is placeholder for a symbol from a font set it doesn't recognize.

There are probably pre-requisites and/or dependencies for Prezto and the Powerlevel10k themes (maybe even the solarized theme as well) that didn't get installed. You can try reinstalling and watch for errors to see what does/doesn't get installed.

At minimum, we need to see your .zprofile and/or .zshrc files to see what modifications were made to your prompt and then possibly try to decipher which Unicode symbol the theme was going for.

And not trying to be a negative Nelly here, I believe this needs to be said: This is one of the issues I have with all these ZSH theme and customization packs. Yes, they're cool and all, but most people have difficulty working in a shell to begin with. Now, let's add a whole bunch of complex stuff to files the user isn't familiar with either and hope for the best.

The best piece of advice I can give is to try to understand your shell, as it is it it's native form before you start trying to make it look cool with scripts and customization found all over the Internet. Why? Do you really (no, I mean really) know what that customization is doing to your computer? How can you be sure you didn't just install a backdoor to your machine?

| improve this answer | |
  • I appreciate the response. I assumed this had something to do with a missing font symbol. Would you like to see my .zprofile and .zshrc? Also, are there any very comprehensive terminal font packs that support all sorts of symbols? Perhaps I could use one of these as a way to troubleshoot. – Thomas W Jul 11 at 22:41
  • 1
    I have no idea, but I'm sure there is. I've been doing this for decades and all my Terminal (iTerm actually) customizations are my own - well, manually put in by me. There's a bit of cool factor but it wasn't the impetus for the customization: imgur.com/a/scRdqAJ everything has a purpose from the colors to the background image. I saw different different ways of doing it, then sat down and figured it out - I know where my Apple image came from as well as the green check in the prompt. Grabbing from others, you don't know where it came from and I could only guess. – Allan Jul 11 at 22:54
  • Thanks for the help and advice. At this point I can afford the performance hit from using a slightly bloated terminal but perhaps in the future (especially if I encounter more headaches as a result of it) I'll make the jump to building my config from the ground up. For the time being though, luckily, I was able to fix my issue! – Thomas W Jul 11 at 23:22
  • 1
    Fixing your issue is the most important thing (well, second actually). I just hope I can help you see things a different way and help you build your skills. :-) – Allan Jul 12 at 0:49
1

After a period of troubleshooting, and with some nudges from Allan, I was able to figure out what was going on: my terminal was attempting to display a unicode lock.

Turns out, my font, Inconsolata for Powerline, didn't support this. I came to this conclusion after reverting to my default theme in iTerm2 WITHOUT Inconsolata enabled. The lock displayed correctly there!

After research, I found a Github repo (and its name is familiar... I feel like I used it on a previous install) of patched fonts that display most of the proper terminal unicode icons. Much thanks to ryanoasis on Github for this!

If you're having a similar problem like me, give it a try and see how it goes. Here's what the fixed terminal looks like:

enter image description here

| improve this answer | |
  • +1 for the solve and the excellent write up of how you got there! – Allan Jul 12 at 0:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .