Skip to content

Instantly share code, notes, and snippets.

@brokaw
Last active November 11, 2017 16:06
Show Gist options
  • Save brokaw/b4ce819a55a380cdbca173999b3f88d2 to your computer and use it in GitHub Desktop.
Save brokaw/b4ce819a55a380cdbca173999b3f88d2 to your computer and use it in GitHub Desktop.
Replacement for $VIRTUAL_ENV/bin/activate
#!/bin/sh
# vex: Virutalenv EXecute
# Inspired by https://gist.github.com/datagrok/2199506
VEXPATH="$(dirname $0)"
export PS1='\[\e[1;31m\](python3)\[\e[0m\] \h:\W \u\$ '
export VIRTUAL_ENV="$HOME/Library/Python/virtualenvs/py3"
export PATH="$VEXPATH:$VIRTUAL_ENV/bin:$PATH"
unset PYTHON_HOME
exec "${@:-$SHELL}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment