Browse files

Using $VIRTUAL_ENV to set virtualenv prompt

  • Loading branch information...
1 parent 2813930 commit f93feb6e016195306113ce56f7cde7604aa5900f @manojlds manojlds committed Feb 14, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 themes/base.theme.bash
View
4 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
}

0 comments on commit f93feb6

Please sign in to comment.