This commit is contained in:
Lucas S. Magalhães 2012-12-02 13:10:00 -08:00
commit 0fbbe890f9
3 changed files with 82 additions and 0 deletions

View file

@ -12,3 +12,17 @@ alias hgp='hg push'
alias hgs='hg status'
# this is the 'git commit --amend' equivalent
alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip'
function hg_current_branch() {
local ref=$(hg branch 2>/dev/null) || return
echo $ref
}
function parse_hg_dirty() {
local num_status=$(hg status | wc -l)
if [ $num_status -eq 0 ]; then
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
else
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
fi
}