From 823bee659c110d7aff2c7524622f8efc7e492192 Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Fri, 3 Nov 2017 09:01:56 +0300 Subject: [PATCH] fix parse_git_dirty() to work on Solaris We need this as Solaris's tail doesn't support `-n` option. However it does support old `-[n]` format so we can simply use `tail -1` instead of `tail -n1` --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index f7eccb81d..5ba1ccac3 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -20,7 +20,7 @@ function parse_git_dirty() { if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then FLAGS+='--untracked-files=no' fi - STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1) + STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -1) fi if [[ -n $STATUS ]]; then echo "$ZSH_THEME_GIT_PROMPT_DIRTY"