summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions/utilities.zsh4
-rw-r--r--functions/vcs.zsh6
2 files changed, 7 insertions, 3 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index 7ca73b36..5ca5b431 100644
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -66,7 +66,7 @@ function getRelevantItem() {
local -a list
local callback
# Explicitly split the elements by whitespace.
- list=${=1}
+ list=(${=1})
callback=$2
for item in $list; do
@@ -149,7 +149,7 @@ function segmentShouldBeJoined() {
local last_segment_index=$2
# Explicitly split the elements by whitespace.
local -a elements
- elements=${=3}
+ elements=(${=3})
local current_segment=${elements[$current_index]}
local joined=false
diff --git a/functions/vcs.zsh b/functions/vcs.zsh
index b23b8330..3eec5dfd 100644
--- a/functions/vcs.zsh
+++ b/functions/vcs.zsh
@@ -7,8 +7,12 @@
################################################################
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' && \
- -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"
VCS_WORKDIR_HALF_DIRTY=true
else