scripts/environment-convertor in rvm-1.0.5 vs scripts/environment-convertor in rvm-1.0.6
- old
+ new
@@ -6,16 +6,22 @@
unset GREP_OPTIONS
source "$rvm_scripts_path/base"
convert_path_to_fish() {
- local path_part="$1"
- local parts="$(echo "$path_part" | sed -e 's#:\$PATH##' -e "s#:#\" \"#g" -e "s#^export \\([^[:space:]]*\\)=##")"
- echo "for path_part in $parts"
- echo ' if test -d $path_part'
- echo ' set PATH $path_parth $PATH'
- echo ' end'
- echo 'end'
+ local parts path_parts
+
+ path_part="$1"
+ parts="$(echo "$path_part" | sed -e 's#:\$PATH##' -e "s#:#\" \"#g" -e "s#^export \\([^[:space:]]*\\)=##")"
+
+ printf "\
+for path_part in $parts
+ if test -d $path_part
+ set PATH $path_parth $PATH
+ end
+end
+"
+ return 0
}
convert_unset_to_fish() {
sed 's#^unset #set -e #'
}