From 6c77b81b43c2e74d91a5198429a4c908e954477f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2015 17:31:28 -0500 Subject: [PATCH] zsh: backward compatibility fix (syntax error in zsh5.0) --- zsh/prompt.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/prompt.zsh b/zsh/prompt.zsh index 972dd2cd..fac28f71 100644 --- a/zsh/prompt.zsh +++ b/zsh/prompt.zsh @@ -29,7 +29,7 @@ prompt_git_dirty() { # check if we're in a git repo [[ "$(command git rev-parse --is-inside-work-tree 2>/dev/null)" == "true" ]] || return # check if it's dirty - [[ "$(git status --porcelain --ignore-submodules -unormal)" ]] || return + command test -n "$(git status --porcelain --ignore-submodules -unormal)" || return echo -n "%F{red}[+]" local r=$(command git rev-list --right-only --count HEAD...@'{u}' 2>/dev/null)