This commit is contained in:
GitHub Merge Button 2012-05-31 14:47:47 -07:00
commit 7cf44f9696

View file

@ -42,3 +42,12 @@ function gems {
-Ee "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \
-Ee "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g"
}
# Go to the directory where the given gem is defined.
#
# Credit to: https://github.com/henrik/dotfiles/blob/master/bash/functions.sh
function cdgem {
local target=${1?No name for a gem given}
local gemdir=`rvm gemdir`
cd ${gemdir}/gems; cd $(find . -maxdepth 1 -name "*${target}*" | sort | tail -1)
}