mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
Merge 5ec68ff511 into f8343b0fd9
This commit is contained in:
commit
0fbbe890f9
3 changed files with 82 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue