Last active
October 4, 2017 21:01
-
-
Save akameco/a1daead32e0d7b10219afedce8fef5a5 to your computer and use it in GitHub Desktop.
gcd(GitHub cd)
This file contains hidden or 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
GHQ=`ghq root`/github.com | |
ME=`git config --get user.name` | |
gcd() { | |
ghq get -p $1 | |
if [ `dirname "$1"` = "." ]; then | |
cd $GHQ/$ME/$1 | |
else | |
cd $GHQ/$1 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment