1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-24 08:01:57 +00:00

When checking for untracked or modified files, take submodules into account

This commit is contained in:
Dominik Ritter 2018-11-03 03:23:23 +01:00
parent 44b4b66925
commit c3f9d04354

View file

@ -8,7 +8,7 @@
set_default POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY false set_default POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY false
function +vi-git-untracked() { function +vi-git-untracked() {
if [[ "$POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY" == "true" && "$(command git submodule foreach 'git ls-files --others --exclude-standard')" != "" ]]; then if [[ "$POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY" == "true" && "$(command git submodule foreach --quiet --recursive 'git ls-files --others --exclude-standard')" != "" ]]; then
hook_com[unstaged]+=" $(print_icon 'VCS_UNTRACKED_ICON')" hook_com[unstaged]+=" $(print_icon 'VCS_UNTRACKED_ICON')"
VCS_WORKDIR_HALF_DIRTY=true VCS_WORKDIR_HALF_DIRTY=true
elif [[ "$(command git ls-files --others --exclude-standard)" != "" ]]; then elif [[ "$(command git ls-files --others --exclude-standard)" != "" ]]; then