Skip to content

Instantly share code, notes, and snippets.

@czekan
Created September 12, 2014 08:53
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 czekan/88d0d3e69e1f224d5143 to your computer and use it in GitHub Desktop.
Save czekan/88d0d3e69e1f224d5143 to your computer and use it in GitHub Desktop.
# Activate virtualenv or show current virtualenv
ve() {
if [ -n "$VIRTUAL_ENV" ]; then
local venv="$(basename $VIRTUAL_ENV)"
if [ -n "$venv" ]; then
echo "($venv) $VIRTUAL_ENV"
fi
else
source env/bin/activate
echo "::: current virtualenv: $VIRTUAL_ENV"
fi
}
# python
alias py='python'
alias ipy='ipython'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment