Skip to content

Instantly share code, notes, and snippets.

@joaorafaelm
Forked from xiongchiamiov/activate
Last active September 11, 2016 15:56
Show Gist options
  • Save joaorafaelm/ebfab0f7b77176a5ec571d22acff78c4 to your computer and use it in GitHub Desktop.
Save joaorafaelm/ebfab0f7b77176a5ec571d22acff78c4 to your computer and use it in GitHub Desktop.
export GOPATH="$(builtin cd "$(dirname "${BASH_SOURCE[0]:-$_}" )" && pwd)"
export OLDPS1=$PS1
export PS1="[go:$(basename $GOPATH)] $PS1"
deactivate() {
export PS1=$OLDPS1
unset GOPATH
unset OLDPS1
unset deactivate
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment