Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I have a problem with it when i use Powerlevel10k which is a theme for ZSH?

Tags:

oh-my-zsh

I have a problem with it when i use Powerlevel10k which is a theme for ZSH?

screenshot

like image 362
苏凯承 Avatar asked Oct 24 '25 22:10

苏凯承


1 Answers

From the Powerlevel10k FAQ:

Q: What do different symbols in Git status mean?

When using Lean, Classic or Rainbow style, Git status may look like this:

feature:master ⇣42⇡42 *42 merge ~42 +42 !42 ?42

Legend:

| Symbol  | Meaning                                                           | Source                                               |
| --------| ------------------------------------------------------------------| ---------------------------------------------------- |
| feature | current branch; replaced with #tag or @commit if not on a branch  | git status                                           |
| master  | remote tracking branch; only shown if different from local branch | git rev-parse --abbrev-ref --symbolic-full-name @{u} |
| ⇣42     | this many commits behind the remote                               | git status                                           |
| ⇡42     | this many commits ahead of the remote                             | git status                                           |
| *42     | this many stashes                                                 | git stash list                                       |
| merge   | repository state                                                  | git status                                           |
| ~42     | this many merge conflicts                                         | git status                                           |
| +42     | this many staged changes                                          | git status                                           |
| !42     | this many unstaged changes                                        | git status                                           |
| ?42     | this many untracked files                                         | git status                                           |

See also: How do I change the format of Git status?

If you've created a Git repository at the root of your home directory to store dotfiles, you probably want to ignore untracked files in it. You can achieve this by executing the following command:

git -C ~ config status.showuntrackedfiles no

This will have several effects:

  • git status will be faster.
  • git status won't list 171 untracked files.
  • ?171 will disappear from your prompt.

You can undo the above command with the following command:

git -C ~ config --unset status.showuntrackedfiles

if you don't want to see Git status in your prompt while in home directory, add this parameter to ~/.p10k.zsh:

# Don't display Git status in prompt for Git repositories whose workdir matches
# this pattern.
typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'

If you don't want to see Git status in your prompt at all, remove vcs from POWERLEVEL9K_LEFT_PROMPT_ELEMENTS array in ~/.p10k.zsh.

like image 123
Roman Perepelitsa Avatar answered Oct 27 '25 02:10

Roman Perepelitsa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!