mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Fixed output of mercurial#parse_hg_dirty
This commit is contained in:
parent
b185dde88e
commit
2617b627d2
1 changed files with 7 additions and 8 deletions
|
|
@ -19,12 +19,11 @@ function hg_current_branch() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_hg_dirty() {
|
function parse_hg_dirty() {
|
||||||
hg status 2> /dev/null \
|
local num_status=$(hg status | wc -l)
|
||||||
| awk '$1 == "?" { unknown = 1 }
|
if [ $num_status -eq 0 ]; then
|
||||||
$1 != "?" { changed = 1 }
|
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||||
END {
|
else
|
||||||
if (changed) printf "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||||
else if (unknown) printf "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
fi
|
||||||
}'
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue