Skip to content

Instantly share code, notes, and snippets.

@andrewytliu
Last active February 19, 2020 10:26
Show Gist options
  • Save andrewytliu/6077153 to your computer and use it in GitHub Desktop.
Save andrewytliu/6077153 to your computer and use it in GitHub Desktop.
RVM fish fix
# in ~/.config/fish/config.fish
# Load the default rubies
if test -z $rvm_bin_path
exec bash --login -c "exec fish" ^&1
end
# ~/.config/fish/functions/rvm.fish
function rvm --description "Ruby Version Manager"
exec bash --login -c "rvm $argv; exec fish"
end
@luizcarvalho
Copy link

Now I not receive any error messages from terminal

@wieczorek1990
Copy link

The other solution from http://rvm.io/integration/fish destroys my PATH.
Somehow after adding your bits to config.fish I cannot su.

@sandric
Copy link

sandric commented Jan 26, 2015

Having the same issue as LuizCarvalho, no error messages in terminal, which is breaking my xmonad session. any ideas?

@philihp
Copy link

philihp commented Feb 19, 2015

@luizcarvalho, @sandric, same here. STDERR goes into the abyss. This is a problem. Additionally, loading the shell is noticeably slower.

@andreicek
Copy link

I found the solution.

if test -z $rvm_bin_path
  exec bash --login -c "exec fish" ^&1
end

Adding ^&1 to the exec redirects both standard output and standard error output.

@carjug
Copy link

carjug commented May 14, 2015

THANK YOU!!!!

@andrewytliu
Copy link
Author

Thanks @andreicek! I've updated the snippet.

@krzkrzkrz
Copy link

Starting a shell doesnt produce anything. No error... I think the initial problem reported by @luizcarvalho is back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment