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 }