diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2018-11-12 01:17:33 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2018-11-12 01:17:33 +0300 |
commit | a90258a9ee6f2aa6e8b7d54c85499756fe5b4003 (patch) | |
tree | 6441e62301e8860f9fbc4fef2043587ed7b6deb8 /functions/vcs.zsh | |
parent | 3256258ebfc04f34116b84b0af83e27e2dfb7400 (diff) |
Avoid warning when inside of .git dir
We cannot detect untracked files when we are inside of
a .git directory.
Diffstat (limited to 'functions/vcs.zsh')
-rwxr-xr-x | functions/vcs.zsh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh index bb877bec..d525f815 100755 --- a/functions/vcs.zsh +++ b/functions/vcs.zsh @@ -8,6 +8,8 @@ set_default POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY false function +vi-git-untracked() { + [[ -z "${vcs_comm[gitdir]}" || "${vcs_comm[gitdir]}" == "." ]] && return + if [[ "$POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY" == "true" && "$(command git submodule foreach --quiet --recursive 'command git ls-files --others --exclude-standard')" != "" ]]; then hook_com[unstaged]+=" $(print_icon 'VCS_UNTRACKED_ICON')" VCS_WORKDIR_HALF_DIRTY=true |