diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-07-31 00:30:47 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-07-31 00:30:47 +0300 |
commit | bb3fbb793c552dafeafcc4e6b48eeb8bd14e842d (patch) | |
tree | 4552dc0085da816eb6997401477a66a27e24cb8d | |
parent | df7f853c8d449567c1d86bde97ad9602d82f538d (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`.
-rw-r--r-- | powerlevel9k.zsh-theme | 2 |
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 } |