mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
Fix Mercurial detection
This commit is contained in:
parent
56b830b69e
commit
238e0de053
1 changed files with 3 additions and 2 deletions
|
|
@ -16,6 +16,7 @@
|
||||||
# * List current IP addresses
|
# * List current IP addresses
|
||||||
# * GCE hook (for controlling Google Cloud)
|
# * GCE hook (for controlling Google Cloud)
|
||||||
# * Virtualenv hook
|
# * Virtualenv hook
|
||||||
|
# * Fix Mercurial detection
|
||||||
#
|
#
|
||||||
# Sep-Oct 2017 Pandu POLUAN <pepoluan@gmail.com>
|
# Sep-Oct 2017 Pandu POLUAN <pepoluan@gmail.com>
|
||||||
|
|
||||||
|
|
@ -36,8 +37,8 @@ ZSH_THEME_GIT_PROMPT_CLEAN="$YS_VCS_PROMPT_CLEAN"
|
||||||
# HG info
|
# HG info
|
||||||
local hg_info='$(ys_hg_prompt_info)'
|
local hg_info='$(ys_hg_prompt_info)'
|
||||||
ys_hg_prompt_info() {
|
ys_hg_prompt_info() {
|
||||||
# make sure this is a hg dir
|
# make sure this is a Mercurial project
|
||||||
if [ -d '.hg' ]; then
|
if [ -d '.hg' ] || $(hg summary > /dev/null 2>&1) ; 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)
|
echo -n $(hg branch 2>/dev/null)
|
||||||
if [ -n "$(hg status 2>/dev/null)" ]; then
|
if [ -n "$(hg status 2>/dev/null)" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue