Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@josejaguirre
Last active May 15, 2016 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josejaguirre/ce045a08017e11be1146fc0c3b200f9b to your computer and use it in GitHub Desktop.
Save josejaguirre/ce045a08017e11be1146fc0c3b200f9b to your computer and use it in GitHub Desktop.
export VIRTUAL_ENV_DISABLE_PROMPT=1
ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="💩"
ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX="💩"
function virtualenv_prompt_info() {
if [ -n "$VIRTUAL_ENV" ]; then
if [ -f "$VIRTUAL_ENV/__name__" ]; then
local name=`cat $VIRTUAL_ENV/__name__`
elif [ `basename $VIRTUAL_ENV` = "__" ]; then
local name=$(basename $(dirname $VIRTUAL_ENV))
else
local name=$(basename $VIRTUAL_ENV)
fi
echo "$fg[yellow]$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX $name $ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX$reset_color $fg[red] ⇝ $reset_color"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment