mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 04:10:07 +00:00
Fixing boolean check for POWERLEVEL9K_SHOW_CHANGESET
Also, random other cleanup.
This commit is contained in:
parent
205d71a647
commit
dcc18581ae
1 changed files with 11 additions and 11 deletions
|
@ -37,32 +37,32 @@ autoload -Uz vcs_info
|
||||||
|
|
||||||
local VCS_WORKDIR_DIRTY=false
|
local VCS_WORKDIR_DIRTY=false
|
||||||
local VCS_CHANGESET_PREFIX=''
|
local VCS_CHANGESET_PREFIX=''
|
||||||
if ( $POWERLEVEL9K_SHOW_CHANGESET ); then
|
if [ $POWERLEVEL9K_SHOW_CHANGESET ]; then
|
||||||
# Just display the first 12 characters of our changeset-ID.
|
# Just display the first 12 characters of our changeset-ID.
|
||||||
VCS_CHANGESET_PREFIX='%12.12i@'
|
VCS_CHANGESET_PREFIX='%12.12i@'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
zstyle ':vcs_info:*' enable git hg
|
zstyle ':vcs_info:*' enable git hg
|
||||||
# The `get-revision` function must be turned on for dirty-check to work for Hg
|
|
||||||
zstyle ':vcs_info:*' get-revision true
|
|
||||||
zstyle ':vcs_info:*' check-for-changes true
|
zstyle ':vcs_info:*' check-for-changes true
|
||||||
|
|
||||||
zstyle ':vcs_info:*' formats " $VCS_CHANGESET_PREFIX%b%c%u%m"
|
zstyle ':vcs_info:*' formats " $VCS_CHANGESET_PREFIX%b%c%u%m"
|
||||||
zstyle ':vcs_info:*' actionformats "%b %F{red}| %a%f"
|
zstyle ':vcs_info:*' actionformats " %b %F{red}| %a%f"
|
||||||
|
|
||||||
zstyle ':vcs_info:*' stagedstr " %F{black}$VCS_STAGED_ICON%f"
|
zstyle ':vcs_info:*' stagedstr " %F{black}$VCS_STAGED_ICON%f"
|
||||||
zstyle ':vcs_info:*' unstagedstr " %F{black}$VCS_UNSTAGED_ICON%f"
|
zstyle ':vcs_info:*' unstagedstr " %F{black}$VCS_UNSTAGED_ICON%f"
|
||||||
|
|
||||||
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked git-aheadbehind git-remotebranch git-tagname
|
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked git-aheadbehind git-remotebranch git-tagname
|
||||||
|
|
||||||
# For Hg, only show the branch name (as opposed to the rev)
|
# For Hg, only show the branch name
|
||||||
zstyle ':vcs_info:hg*:*' branchformat "%b"
|
zstyle ':vcs_info:hg*:*' branchformat "%b"
|
||||||
|
# The `get-revision` function must be turned on for dirty-check to work for Hg
|
||||||
|
zstyle ':vcs_info:hg*:*' get-revision true
|
||||||
|
|
||||||
if ( $POWERLEVEL9K_SHOW_CHANGESET ); then
|
if [ $POWERLEVEL9K_SHOW_CHANGESET ]; then
|
||||||
zstyle ':vcs_info:*' get-revision true # If false, the dirty-check won't work in mercurial
|
zstyle ':vcs_info:*' get-revision true
|
||||||
else
|
else
|
||||||
# A little performance-boost (at least for mercurial). If we don't show
|
# A little performance-boost for large repositories (especially Hg). If we
|
||||||
# the changeset, we can switch to simple mode.
|
# don't show the changeset, we can switch to simple mode.
|
||||||
zstyle ':vcs_info:*' use-simple true
|
zstyle ':vcs_info:*' use-simple true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue