Skip to content

Instantly share code, notes, and snippets.

@rboyd
Created June 6, 2011 21:09
Show Gist options
  • Select an option

  • Save rboyd/1011116 to your computer and use it in GitHub Desktop.

Select an option

Save rboyd/1011116 to your computer and use it in GitHub Desktop.
diff --git a/lib/rvm/shell/shell_wrapper.sh b/lib/rvm/shell/shell_wrapper.sh
index dd7fb06..6e90d47 100644
--- a/lib/rvm/shell/shell_wrapper.sh
+++ b/lib/rvm/shell/shell_wrapper.sh
@@ -2,12 +2,10 @@
__rvm_show_command_epilog() {
local last_command_result="$?"
echo "---------------RVM-RESULTS-START---------------"
- echo "---"
- echo " exit_status: \"$last_command_result\""
- echo " environment:"
- \env | \sed \
- -e "s#'#\\'#g" \
- -e 's#"#\\"#g' \
- -e "s#\\([^=]*\\)=\\(.*\\)# '\1': \"\2\"#"
+ echo "$(ruby -rrubygems -ryaml -e 'puts YAML.dump("exit_status" => ARGV[0], "environment" => ENV.to_hash)' $last_command_result)"
echo "----------------RVM-RESULTS-END----------------"
+ #\env | \sed \
+ # -e "s#'#\\'#g" \
+ # -e 's#"#\\"#g' \
+ # -e "s#\\([^=]*\\)=\\(.*\\)# '\1': \"\2\"#"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment