Remove mercurial prompt

This commit is contained in:
Pavle Portic 2020-11-14 16:44:48 +01:00
parent 4a6c728dcb
commit 1f1390148a
Signed by: TheEdgeOfRage
GPG Key ID: 6758ACE46AA2A849
1 changed files with 0 additions and 36 deletions

View File

@ -135,41 +135,6 @@ prompt_git() {
fi
}
prompt_hg() {
local rev status
if $(hg id >/dev/null 2>&1); then
if $(hg prompt >/dev/null 2>&1); then
if [[ $(hg prompt "{status|unknown}") = "?" ]]; then
# if files are not added
prompt_segment red white
st='±'
elif [[ -n $(hg prompt "{status|modified}") ]]; then
# if any modification
prompt_segment yellow black
st='±'
else
# if working copy is clean
prompt_segment green black
fi
echo -n $(hg prompt "☿ {rev}@{branch}") $st
else
st=""
rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')
branch=$(hg id -b 2>/dev/null)
if `hg st | grep -q "^\?"`; then
prompt_segment red black
st='±'
elif `hg st | grep -q "^[MA]"`; then
prompt_segment yellow black
st='±'
else
prompt_segment green black
fi
echo -n "☿ $rev@$branch" $st
fi
fi
}
# Dir: current working directory
prompt_dir() {
if [[ -w "$PWD" ]]; then
@ -215,7 +180,6 @@ build_prompt() {
prompt_context
prompt_dir
prompt_git
prompt_hg
prompt_end
}