Created
January 31, 2009 00:20
-
-
Save slumos/55367 to your computer and use it in GitHub Desktop.
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
function cdgem { | |
bundle="$(bundle show $1)" | |
gem="$(gem which $1 2>/dev/null | grep '^/')" | |
for gem_dir in "${bundle}" "${gem:h}"; do | |
if [[ -d "${gem_dir}" ]]; then | |
cd "${gem_dir}" | |
return | |
fi | |
done | |
print 'not found' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment