mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
My work machine has a problem with tail
This commit is contained in:
parent
dcd8d8cad2
commit
ed45817b77
1 changed files with 5 additions and 20 deletions
17
lib/git.zsh
17
lib/git.zsh
|
|
@ -8,26 +8,11 @@ function git_prompt_info() {
|
||||||
|
|
||||||
# Checks if working tree is dirty
|
# Checks if working tree is dirty
|
||||||
parse_git_dirty() {
|
parse_git_dirty() {
|
||||||
local SUBMODULE_SYNTAX=''
|
if [[ -n $(git diff ${SUBMODULE_SYNTAX} HEAD 2> /dev/null) ]]; then
|
||||||
local GIT_STATUS=''
|
|
||||||
local CLEAN_MESSAGE='nothing to commit (working directory clean)'
|
|
||||||
if [[ "$(command git config --get oh-my-zsh.hide-status)" != "1" ]]; then
|
|
||||||
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
|
|
||||||
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
|
|
||||||
fi
|
|
||||||
if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then
|
|
||||||
GIT_STATUS=$(command git status -s ${SUBMODULE_SYNTAX} -uno 2> /dev/null | tail -n1)
|
|
||||||
else
|
|
||||||
GIT_STATUS=$(command git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
|
|
||||||
fi
|
|
||||||
if [[ -n $GIT_STATUS ]]; then
|
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||||
else
|
else
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# get the difference between the local and remote branches
|
# get the difference between the local and remote branches
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue