zshoh-my-zshpowerline

Prompt theme with Git support marking a number after a questionmark


I'm using Ubuntu on WSL2, having installed powerlevel10k on oh-my-zsh.

enter image description here

What is that weird question-mark-number next to the git branch name, what does it mean?


Solution

  • You have 1 untracked file in your repo. Do git status --short and you'll see the same symbol. See the P10k documentation for an overview of the symbols it uses.


    As an aside, be aware that most of the other symbols used by P10k are different from the ones used by git status (or other prompts; see below). As you can see, it uses a lot of Unicode symbols, whereas git status restricts itself to ASCII symbols.

    Further adding to the confusion, the git-prompt.sh theme distributed with git uses yet an another set of symbols, based on those . These, too, are restricted to ASCII symbols. Since they are not officially documented anywhere, I’ll list them here, in case anyone needs it:

    Symbol Meaning
    < behind
    > ahead
    <> diverged
    = in sync
    | operation in progress
    + staged
    * unstaged
    % untracked
    $ stash
    ? sparse checkout

    In any case, when in doubt about any particular prompt theme, always check to see if there’s documentation.