summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2015-07-31 00:30:47 +0300
committerDominik Ritter <dritter03@googlemail.com>2015-07-31 00:30:47 +0300
commitbb3fbb793c552dafeafcc4e6b48eeb8bd14e842d (patch)
tree4552dc0085da816eb6997401477a66a27e24cb8d /powerlevel9k.zsh-theme
parentdf7f853c8d449567c1d86bde97ad9602d82f538d (diff)
`test -n` seems to read the whole string. For performance issues we just analyze the first line by stripping the output of cat to the first line with `sed q`.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r--powerlevel9k.zsh-theme2
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 4982d5ae..a60114bc 100644
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -337,7 +337,7 @@ prompt_vcs() {
function +vi-git-untracked() {
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' && \
- -n $(git ls-files --others --exclude-standard) ]]; then
+ -n $(git ls-files --others --exclude-standard | sed q) ]]; then
hook_com[unstaged]+=" %F{$VCS_FOREGROUND_COLOR}$VCS_UNTRACKED_ICON%f"
fi
}