Powerlevel10k’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/romkatv/powerlevel10k/llms.txt
Use this file to discover all available pages before exploring further.
vcs segment displays rich, real-time Git repository status directly in your prompt. It is powered by gitstatus, which spawns a native gitstatusd daemon in the background. Because gitstatusd uses libgit2 rather than shelling out to the git binary, it can inspect even very large repositories with virtually zero perceptible latency.
Reading the Git status line
When using Lean, Classic, or Rainbow style, Git status may look like this:| Symbol | Meaning | Source |
|---|---|---|
feature | current branch; replaced with #tag or @commit if not on a branch | git status --ignore-submodules=dirty |
master | remote tracking branch; only shown if different from local branch | git rev-parse --abbrev-ref --symbolic-full-name @{upstream} |
wip | the latest commit’s summary contains “wip” or “WIP” | git show --pretty=%s --no-patch HEAD |
= | up to date with the remote (neither ahead nor behind) | git rev-list --count HEAD...@{upstream} |
⇣42 | this many commits behind the remote | git rev-list --right-only --count HEAD...@{upstream} |
⇡42 | this many commits ahead of the remote | git rev-list --left-only --count HEAD...@{upstream} |
⇠42 | this many commits behind the push remote | git rev-list --right-only --count HEAD...@{push} |
⇢42 | this many commits ahead of the push remote | git rev-list --left-only --count HEAD...@{push} |
*42 | this many stashes | git stash list |
merge | repository state | git status --ignore-submodules=dirty |
~42 | this many merge conflicts | git status --ignore-submodules=dirty |
+42 | this many staged changes | git status --ignore-submodules=dirty |
!42 | this many unstaged changes | git status --ignore-submodules=dirty |
?42 | this many untracked files | git status --ignore-submodules=dirty |
─ | the number of staged, unstaged or untracked files is unknown | echo $POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY or git config --get bash.showDirtyState |
Asynchronous updates and the loading colour
Because computing a complete Git status for a large repository can take more than a few milliseconds, Powerlevel10k uses an async model: it shows the last known Git status immediately (in a greyed-out colour) and refreshes the prompt automatically once the background computation finishes. If the computation completes in under 10 milliseconds (the default threshold), the prompt shows the coloured status right away and no grey flash is visible. You can control both of these behaviours:POWERLEVEL9K_VCS_LOADING_BACKGROUND, open ~/.p10k.zsh, search for the parameter, uncomment it if it is commented out, and set it to your preferred colour number.
Ignoring $HOME/.git
By default, configs generated byp10k configure include the following parameter:
Many users keep a bare or dotfiles Git repository rooted at
$HOME. Showing its status all
the time would make the prompt noisy regardless of what you are working on, so it is suppressed
by default. To display Git status for $HOME/.git, open ~/.p10k.zsh and remove or comment
out the POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN line.Customising the Git status format
The exact text rendered by thevcs segment is produced by the my_git_formatter function in ~/.p10k.zsh. To change which symbols are used, their order, or the colours applied to each part, open ~/.p10k.zsh and search for my_git_formatter. The function is fully annotated and straightforward to edit.
SVN and Mercurial backends
By default, only the
git VCS backend is enabled in Powerlevel10k. If you need svn or hg
support, add them to POWERLEVEL9K_VCS_BACKENDS. Be aware that these backends are not yet
optimised in Powerlevel10k and will make the prompt noticeably slower.Incorrect Git status and libgit2 limitations
Powerlevel10k relies on gitstatus, which uses the libgit2 library internally. libgit2 has some gaps in its implementation that can cause discrepancies between whatgit status reports and what appears in
your prompt.
The most common known issue is that libgit2 does not support skipHash. If you notice
incorrect Git status in your prompt, run git config -l and check whether skipHash is enabled.
If it is, consider disabling it. Keep in mind that skipHash may be implicitly enabled when
activating certain Git features such as manyFiles.