Skip to content

Instantly share code, notes, and snippets.

@coolgo
Forked from chriselly/cdd command
Created December 20, 2012 16:04
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 coolgo/4346199 to your computer and use it in GitHub Desktop.
Save coolgo/4346199 to your computer and use it in GitHub Desktop.
cdd () {
repo_folder="/Work/Development"
test=`find $repo_folder/* -maxdepth 0 -type d | grep -i "$1" -m 1`
if [ ! $1 ] || [ ! $test ]; then
cd $repo_folder
else
cd $test
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment