mercurial: removed redundant checks

This commit is contained in:
Alejandro Baez 2015-08-07 17:31:23 -04:00
commit 676266345b

View file

@ -26,9 +26,7 @@ function in_hg() {
}
function hg_get_branch_name() {
if [ $(in_hg) ]; then
echo $(hg branch)
fi
}
function hg_prompt_info {
@ -41,7 +39,6 @@ $ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_PROMPT_BASE_COLOR$
}
function hg_dirty_choose {
if [ $(in_hg) ]; then
hg status 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'
if [ $pipestatus[-1] -eq 0 ]; then
# Grep exits with 0 when "One or more lines were selected", return "dirty".
@ -50,7 +47,6 @@ function hg_dirty_choose {
# Otherwise, no lines were found, or an error occurred. Return clean.
echo $2
fi
fi
}
function hg_dirty {