This commit is contained in:
Ferenc Szalai 2013-05-17 20:29:58 -07:00
commit 5bf893363e
2 changed files with 15 additions and 0 deletions

View file

@ -22,3 +22,17 @@ function hg_current_branch() {
echo hg:$(hg branch)
fi
}
function parse_hg_dirty() {
if [[ -n $(hg status -mard . 2> /dev/null) ]]; then
echo "$ZSH_THEME_HG_PROMPT_DIRTY"
else
echo "$ZSH_THEME_HG_PROMPT_CLEAN"
fi
}
function hg_prompt_info() {
if [ -d .hg ]; then
echo "$ZSH_THEME_HG_PROMPT_PREFIX$(hg branch)$(parse_hg_dirty)$ZSH_THEME_HG_PROMPT_SUFFIX"
fi
}

View file

@ -58,6 +58,7 @@ case "$words[1]" in
_arguments \
'(-U --upgrade)'{-U,--upgrade}'[upgrade all packages to the newest available version]' \
'(-f --find-links)'{-f,--find-links}'[URL for finding packages]' \
'(-r --requirement)'{-r,--requirement}'[Requirements file for packages to install]:File:_files' \
'(--no-deps --no-dependencies)'{--no-deps,--no-dependencies}'[iIgnore package dependencies]' \
'(--no-install)--no-install[only download packages]' \
'(--no-download)--no-download[only install downloaded packages]' \