Last active
March 1, 2017 02:14
-
-
Save carolynvs/0ab0023aa992ae47d35a5c87df52960e to your computer and use it in GitHub Desktop.
Quickly cd into a golang repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That... is brilliant.