mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
hg branch command is sometimes slow, run it just once
This commit is contained in:
parent
75b9030f48
commit
7bf70fffb7
1 changed files with 3 additions and 2 deletions
|
|
@ -34,8 +34,9 @@ ys_hg_prompt_info() {
|
||||||
# make sure this is a hg dir
|
# make sure this is a hg dir
|
||||||
if [ -d '.hg' ]; then
|
if [ -d '.hg' ]; then
|
||||||
echo -n "${YS_VCS_PROMPT_PREFIX1}hg${YS_VCS_PROMPT_PREFIX2}"
|
echo -n "${YS_VCS_PROMPT_PREFIX1}hg${YS_VCS_PROMPT_PREFIX2}"
|
||||||
echo -n $(hg branch 2>/dev/null)
|
hgbranch=$(hg branch 2>/dev/null)
|
||||||
if [ -n "$(hg status 2>/dev/null)" ]; then
|
echo -n $hgbranch
|
||||||
|
if [ -n "$hgbranch" ]; then
|
||||||
echo -n "$YS_VCS_PROMPT_DIRTY"
|
echo -n "$YS_VCS_PROMPT_DIRTY"
|
||||||
else
|
else
|
||||||
echo -n "$YS_VCS_PROMPT_CLEAN"
|
echo -n "$YS_VCS_PROMPT_CLEAN"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue