Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jonathantneal
Created September 18, 2018 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathantneal/f7cb7a49a914f3963ca100fe34ae44f2 to your computer and use it in GitHub Desktop.
Save jonathantneal/f7cb7a49a914f3963ca100fe34ae44f2 to your computer and use it in GitHub Desktop.
Goto GitHub Project: No more cd’ing between multiple user/project directories
# USAGE: `goto some-project-dirname`
goto () {
# where `~/GitHub` is the directory where you put all of your projects
DIR=$(find ~/GitHub -type d -name "node_modules" -prune -o -type d -name "$1" -print)
cd -P -- "$DIR"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment