Skip to content

Instantly share code, notes, and snippets.

@maemual
Created August 30, 2015 07:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save maemual/2afc82e676ef807385cd to your computer and use it in GitHub Desktop.
Save maemual/2afc82e676ef807385cd to your computer and use it in GitHub Desktop.
golang virtualenv
export GOPATH="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"
export OLDPS1=$PS1
export PS1="[go:$(basename $GOPATH)] $PS1"
alias gcd="cd $GOPATH"
deactivate() {
export PS1=$OLDPS1
unset GOPATH
unset OLDPS1
unalias gcd
unset deactivate
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment