1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-22 23:21:57 +00:00

Merge pull request #211 from Falkor/feature/better_dirty_check

VCS dirty check even in subdirs
This commit is contained in:
Ben Hilburn 2016-02-09 10:18:03 -08:00
commit 2d196fa12f

View file

@ -7,8 +7,12 @@
################################################################ ################################################################
function +vi-git-untracked() { function +vi-git-untracked() {
local FLAGS
FLAGS=('--porcelain')
# TODO: check git >= 1.7.2 - see function git_compare_version()
FLAGS+='--ignore-submodules=dirty'
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' && \ if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' && \
-n $(git ls-files --others --exclude-standard | sed q) ]]; then -n $(git status ${FLAGS} | grep '^??' 2> /dev/null | tail -n1) ]]; then
hook_com[unstaged]+=" %F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_UNTRACKED_ICON')%f" hook_com[unstaged]+=" %F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_UNTRACKED_ICON')%f"
VCS_WORKDIR_HALF_DIRTY=true VCS_WORKDIR_HALF_DIRTY=true
else else