diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-02-10 20:08:09 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-02-10 20:08:09 +0300 |
commit | 7c8e7d960c4bc4788d2f3587ab2113c4744140ca (patch) | |
tree | 574a3031d0ae4ec06de3f1f55f427e1c8dfb0823 /config/p10k-lean.zsh | |
parent | 6f4840b4636666dcb639185181988084ba5c4ca5 (diff) |
add POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to config templates and display "─" if worktree scan was skipped
Diffstat (limited to 'config/p10k-lean.zsh')
-rw-r--r-- | config/p10k-lean.zsh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index b1f6b6c5..334efc35 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -434,11 +434,26 @@ # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. # Remove the next line if you don't want to see untracked files at all. (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" + # "─" if the number of unstaged files is unknown. This can happen due to + # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower + # than the number of files in the Git index, or due to bash.showDirtyState being set to false + # in the repository config. The number of staged and untracked files may also be unknown + # in this case. + (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" typeset -g my_git_format=$res } functions -M my_git_formatter 2>/dev/null + # Don't count the number of unstaged, untracked and conflicted files in Git repositories with + # more than this many files in the index. Negative value means infinity. + # + # If you are working in Git repositories with tens of millions of files and seeing performance + # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output + # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's + # config: `git config bash.showDirtyState false`. + typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + # Disable the default Git status formatting. typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true # Install our own Git status formatter. |