Code Review
/
common
/
bash_it.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
2813930
)
Using $VIRTUAL_ENV to set virtualenv prompt
author
manojlds
<manojlds@gmail.com>
Thu, 14 Feb 2013 05:08:12 +0000
(10:38 +0530)
committer
manojlds
<manojlds@gmail.com>
Thu, 14 Feb 2013 05:08:12 +0000
(10:38 +0530)
themes/base.theme.bash
patch
|
blob
|
history
diff --git
a/themes/base.theme.bash
b/themes/base.theme.bash
index
f096fda
..
18c6c9d
100644
(file)
--- a/
themes/base.theme.bash
+++ b/
themes/base.theme.bash
@@
-137,8
+137,8
@@
function ruby_version_prompt {
}
function virtualenv_prompt {
- if
which virtualenv &> /dev/null
; then
- virtualenv=
$([ ! -z "$VIRTUAL_ENV" ] && echo "`basename $VIRTUAL_ENV`") || return
+ if
[[ -n "$VIRTUAL_ENV" ]]
; then
+ virtualenv=
`basename "$VIRTUAL_ENV"`
echo -e "$VIRTUALENV_THEME_PROMPT_PREFIX$virtualenv$VIRTUALENV_THEME_PROMPT_SUFFIX"
fi
}