mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +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
|
||||
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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue