mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-21 20:00:07 +00:00
Less dependencies. If sed q | wc -l
is just for testing if the string is empty or not, we can do that with just ZSH. Trusting that the implentation of test -n
is intelligent enough to abort if a character is found.
This commit is contained in:
parent
c37e4a8fa0
commit
df7f853c8d
1 changed files with 1 additions and 1 deletions
|
@ -337,7 +337,7 @@ prompt_vcs() {
|
|||
|
||||
function +vi-git-untracked() {
|
||||
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' && \
|
||||
${$(git ls-files --others --exclude-standard | sed q | wc -l)// /} != 0 ]]; then
|
||||
-n $(git ls-files --others --exclude-standard) ]]; then
|
||||
hook_com[unstaged]+=" %F{$VCS_FOREGROUND_COLOR}$VCS_UNTRACKED_ICON%f"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue