diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-07-30 01:18:48 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-07-30 01:18:48 +0300 |
commit | df7f853c8d449567c1d86bde97ad9602d82f538d (patch) | |
tree | 0763df865b07fd29c3f14e921946c17f5f3f7e2a /powerlevel9k.zsh-theme | |
parent | c37e4a8fa0e02ed7406dfbbfdaadc4bb103393d5 (diff) |
Less dependencies. If `sed q | wc -l` is just for testing if the string is empty or not, we can do that with just ZSH. Trusting that the implentation of `test -n` is intelligent enough to abort if a character is found.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-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 1b52d038..4982d5ae 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' && \ - ${$(git ls-files --others --exclude-standard | sed q | wc -l)// /} != 0 ]]; then + -n $(git ls-files --others --exclude-standard) ]]; then hook_com[unstaged]+=" %F{$VCS_FOREGROUND_COLOR}$VCS_UNTRACKED_ICON%f" fi } |