scripts/list in rvm-0.1.47 vs scripts/list in rvm-1.0.0
- old
+ new
@@ -33,11 +33,11 @@
fi
printf "$(tput setaf 2)$version$(tput sgr0) $string"
done ; unset version
if [[ -f "$rvm_config_path/default" ]] && [[ -s $rvm_config_path/default ]] ; then
- version=$(grep 'MY_RUBY_HOME' $rvm_config_path/default | head -n1 | awk -F"'" '{print $2}' | xargs basename --)
+ version=$(\grep 'MY_RUBY_HOME' $rvm_config_path/default | head -n1 | awk -F"'" '{print $2}' | xargs basename --)
if [[ ! -z "$version" ]] ; then
printf "\n\nDefault Ruby (for new shells)\n"
string="[ $(file $rvm_rubies_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | \tr "\n" ' ')]"
printf "\n $(tput setaf 2)$version$(tput sgr0) $string"
fi ; unset version
@@ -79,11 +79,11 @@
}
# This is meant to be used with scripting.
list_gemset_strings() {
local all_rubies="$(list_strings)"
- for gemset in $(\ls $rvm_gems_path/ 2>/dev/null | xargs -n1 basename -- | grep -v '^\(@\|doc$\|cache$\|system$\)' | sort); do
+ for gemset in $(\ls $rvm_gems_path/ 2>/dev/null | xargs -n1 basename -- | \grep -v '^\(@\|doc$\|cache$\|system$\)' | sort); do
local ruby_name="$(echo "$gemset" | awk -F$rvm_gemset_separator '{print $1}')"
[[ "$all_rubies" != *"$ruby_name"* ]] && continue
echo "$gemset"
done
}
@@ -109,16 +109,16 @@
list_rubies_strings() {
find "$rvm_rubies_path/" -type d -maxdepth 1 | tail -n+2 | xargs -n1 basename -- | __rvm_strip
}
list_rubies() {
-
+
if [[ "$1" = "strings" ]]; then
list_rubies_strings
return 0
fi
-
+
echo
current_ruby="$(__rvm_environment_identifier | awk -F"$rvm_gemset_separator" '{print $1}')"
printf "rvm rubies\n"
@@ -138,10 +138,10 @@
fi
printf "$(tput setaf 2)$version$(tput sgr0) $string"
done ; unset version
if [[ -f "$rvm_config_path/default" ]] && [[ -s $rvm_config_path/default ]] ; then
- version=$(grep 'MY_RUBY_HOME' $rvm_config_path/default | head -n 1 | awk -F"'" '{print $2}' | xargs basename --)
+ version=$(\grep 'MY_RUBY_HOME' $rvm_config_path/default | head -n 1 | awk -F"'" '{print $2}' | xargs basename --)
if [[ ! -z "$version" ]] ; then
printf "\n\nDefault Ruby (for new shells)\n"
string="[ $(file $rvm_rubies_path/$version/bin/ruby | awk '/x86.64/ {print "x86_64"} /386/ {print "i386"} /ppc/ {print "ppc"}' | \tr "\n" ' ')]"
printf "\n $(tput setaf 2)$version$(tput sgr0) $string"
fi ; unset version