From eca1617841318d3c4baef5a16a4302bb697171cd Mon Sep 17 00:00:00 2001 From: Peter Armstrong Date: Mon, 22 Sep 2014 09:34:16 +0100 Subject: [PATCH 1/2] rvm plugin fix #217 --- plugins/rvm/rvm.fish | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/rvm/rvm.fish b/plugins/rvm/rvm.fish index 01295ae..a6e0752 100644 --- a/plugins/rvm/rvm.fish +++ b/plugins/rvm/rvm.fish @@ -3,8 +3,11 @@ function rvm -d 'Ruby enVironment Manager' set -l env_file (mktemp -t rvm.fish.XXXXXXXXXX) bash -c '[ -e ~/.rvm/scripts/rvm ] && source ~/.rvm/scripts/rvm || source /usr/local/rvm/scripts/rvm; cd .;rvm "$@"; status=$?; env > "$0"; exit $status' $env_file $argv + # grep the rvm_* *PATH RUBY_* GEM_* variables from the captured environment + # exclude lines with _clr and _debug # apply rvm_* *PATH RUBY_* GEM_* variables from the captured environment - and eval (grep '^rvm\|^[^=]*PATH\|^RUBY_\|^GEM_' $env_file |grep -v _clr| sed '/^[^=]*PATH/y/:/ /; s/^/set -xg /; s/=/ /; s/$/ ;/; s/(//; s/)//') + + and eval (grep '^rvm\|^[^=]*PATH\|^RUBY_\|^GEM_' $env_file |grep -v _clr| |grep -v _debug| sed '/^[^=]*PATH/y/:/ /; s/^/set -xg /; s/=/ /; s/$/ ;/; s/(//; s/)//') # clean up rm -f $env_file From ecf1af6228b3d8ed7dde3304124645b2bc2980d3 Mon Sep 17 00:00:00 2001 From: Peter Armstrong Date: Mon, 22 Sep 2014 09:45:55 +0100 Subject: [PATCH 2/2] rvm plugin fix #217 - removed extra | --- plugins/rvm/rvm.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/rvm/rvm.fish b/plugins/rvm/rvm.fish index a6e0752..cbbd0de 100644 --- a/plugins/rvm/rvm.fish +++ b/plugins/rvm/rvm.fish @@ -7,7 +7,7 @@ function rvm -d 'Ruby enVironment Manager' # exclude lines with _clr and _debug # apply rvm_* *PATH RUBY_* GEM_* variables from the captured environment - and eval (grep '^rvm\|^[^=]*PATH\|^RUBY_\|^GEM_' $env_file |grep -v _clr| |grep -v _debug| sed '/^[^=]*PATH/y/:/ /; s/^/set -xg /; s/=/ /; s/$/ ;/; s/(//; s/)//') + and eval (grep '^rvm\|^[^=]*PATH\|^RUBY_\|^GEM_' $env_file |grep -v _clr |grep -v _debug| sed '/^[^=]*PATH/y/:/ /; s/^/set -xg /; s/=/ /; s/$/ ;/; s/(//; s/)//') # clean up rm -f $env_file