Permalink
Browse files

Feature: 'rvm gempath', 'rvm gemhome', similar for gemsets.

  • Loading branch information...
1 parent 8ce0b7f commit d089a5d2d90e81faaf47ca1f41b6b062c338efb5 @wayneeseguin wayneeseguin committed May 27, 2010
Showing with 9 additions and 9 deletions.
  1. +3 −3 scripts/cli
  2. +6 −6 scripts/gemsets
View
@@ -95,7 +95,7 @@ __rvm_parse_args() {
rvm_parse_break=1
;;
- gemdir)
+ gemdir|gempath|gemhome)
rvm_action=$rvm_token
rvm_gemdir_flag=1
if [[ "system" = "$1" ]] ; then rvm_system_flag=1 ; shift ; fi
@@ -458,8 +458,8 @@ rvm() {
unset rvm_wrapper_name
;;
- gemdir)
- $rvm_scripts_path/gemsets gemdir
+ gemdir|gemhome|gempath)
+ $rvm_scripts_path/gemsets $rvm_action
result=$?
;;
View
@@ -295,17 +295,17 @@ __rvm_gem_install() {
}
# Output the user's current gem directory.
-__rvm_gemset_gemdir() {
+__rvm_gemset_info() {
if [[ "$rvm_user_flag" -eq 1 ]] ; then
echo $(rvm system ; gem env | grep "\- $HOME" | awk '{print $NF}')
elif [[ "$rvm_system_flag" -eq 1 ]] ; then
- echo $(rvm system ; gem env gemdir system)
+ echo $(rvm system ; gem env $action system)
elif [[ ! -z "$rvm_ruby_string" ]] ; then
- echo $(rvm "$rvm_ruby_string" ; gem env gemdir)
+ echo $(rvm "$rvm_ruby_string" ; gem env $action)
elif [[ ! -z "$GEM_HOME" ]] ; then
echo "$GEM_HOME"
else
- gem env gemdir
+ gem env $action
fi
}
@@ -342,8 +342,8 @@ elif [[ "dir" = "$action" ]] ; then
__rvm_gemset_dir
elif [[ "list" = "$action" ]] ; then
__rvm_gemset_list
-elif [[ "gemdir" = "$action" ]] ; then
- __rvm_gemset_gemdir
+elif [[ "gemdir" = "$action" ]] || [[ "gempath" = "$action" ]] || [[ "gemhome" = "$action" ]] || [[ "home" = "$action" ]] || [[ "path" = "$action" ]] || [[ "version" = "$action" ]] ; then
+ __rvm_gemset_info
elif [[ "install" = "$action" ]] ; then
__rvm_gem_install $*
elif [[ "pristine" = "$action" ]] ; then

0 comments on commit d089a5d

Please sign in to comment.