Skip to content

Instantly share code, notes, and snippets.

@carolynvs
Last active March 1, 2017 02:14
Show Gist options
  • Save carolynvs/0ab0023aa992ae47d35a5c87df52960e to your computer and use it in GitHub Desktop.
Save carolynvs/0ab0023aa992ae47d35a5c87df52960e to your computer and use it in GitHub Desktop.
Quickly cd into a golang repo
# 0. Add this function to ~/.bashrc.
# On a mac, install coreutils first and add this function to your ~/.bash_profile.
# 1. Make a shorter symlink pointing to the long golang directory name
# ln -s ~/go/src/github.com/foo/bar ~/foobar
# 2. goto foobar
goto() {
cd `realpath ~/$1`
}
@mrxinu
Copy link

mrxinu commented Feb 27, 2017

That... is brilliant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment