mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Auto-open virtualenv on mercurial like on git
This commit is contained in:
parent
5e09986d2d
commit
128e426f01
1 changed files with 3 additions and 0 deletions
|
|
@ -11,6 +11,9 @@ if (( $+commands[$virtualenvwrapper] )); then
|
||||||
WORKON_CWD=1
|
WORKON_CWD=1
|
||||||
# Check if this is a Git repo
|
# Check if this is a Git repo
|
||||||
PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null`
|
PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null`
|
||||||
|
if (( $? != 0 )); then
|
||||||
|
PROJECT_ROOT=`hg prompt '{root}' 2>/dev/null`
|
||||||
|
fi
|
||||||
if (( $? != 0 )); then
|
if (( $? != 0 )); then
|
||||||
PROJECT_ROOT="."
|
PROJECT_ROOT="."
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue