Last active
August 29, 2015 14:06
-
-
Save Atala/c4b90a6782b211310c5d to your computer and use it in GitHub Desktop.
Snippet for postactivate hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This hook is sourced after every virtualenv is activated. | |
proj_name=$(basename $VIRTUAL_ENV) | |
cd ~/src/$proj_name | |
# show virtualenv | |
PS1="$_OLD_VIRTUAL_PS1" | |
_OLD_RPROMPT="$RPROMPT" | |
RPROMPT="%{${fg_bold[white]}%}(env: %{${fg[green]}%}`basename \"$VIRTUAL_ENV\"`%{${fg_bold[white]}%})%{${reset_color}%} $RPROMPT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment