mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
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`
This commit is contained in:
parent
4cb730773b
commit
823bee659c
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ function parse_git_dirty() {
|
||||||
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
|
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
|
||||||
FLAGS+='--untracked-files=no'
|
FLAGS+='--untracked-files=no'
|
||||||
fi
|
fi
|
||||||
STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1)
|
STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -1)
|
||||||
fi
|
fi
|
||||||
if [[ -n $STATUS ]]; then
|
if [[ -n $STATUS ]]; then
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue