summaryrefslogtreecommitdiff
path: root/lib/git.zsh
diff options
context:
space:
mode:
authorKevin Burke <kevin@burke.dev>2021-11-09 00:04:10 -0800
committerGitHub <noreply@github.com>2021-11-09 09:04:10 +0100
commite86c6f5e7fc9f024a427e2870ab70644b5454725 (patch)
treebde5878b37dc151ae8643ef0473ea90a0d89a830 /lib/git.zsh
parent55682e36920e2ab7633fc6eee11466d3faed0bf8 (diff)
downloadzsh-e86c6f5e7fc9f024a427e2870ab70644b5454725.tar.gz
zsh-e86c6f5e7fc9f024a427e2870ab70644b5454725.tar.bz2
zsh-e86c6f5e7fc9f024a427e2870ab70644b5454725.zip
style: use `-n` flag in `head` and `tail` commands (#10391)
Co-authored-by: Marc Cornellà <hello@mcornella.com>
Diffstat (limited to 'lib/git.zsh')
-rw-r--r--lib/git.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/git.zsh b/lib/git.zsh
index 9a615e77b..8623473b0 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -51,7 +51,7 @@ function parse_git_dirty() {
FLAGS+="--ignore-submodules=${GIT_STATUS_IGNORE_SUBMODULES:-dirty}"
;;
esac
- STATUS=$(__git_prompt_git status ${FLAGS} 2> /dev/null | tail -1)
+ STATUS=$(__git_prompt_git status ${FLAGS} 2> /dev/null | tail -n 1)
fi
if [[ -n $STATUS ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"