New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shims for Fish shell #195
Comments
I'd like to put in my support for this. |
Seems the shims are fine, it's the install guide that needs tweaking. Add this to config.fish for rbenv support:
|
Thanks, Ed! :) |
Works like a charm. |
As @emcmanus pointed out, rbenv's shims work fine with Fish or any other shell. You only need Bash installed to use them—it doesn't need to be your shell. The shims are Bash scripts, and you can run them from Fish in the same way that you can run a Ruby or Python script from Fish. Adding rbenv to your |
It looks like this isn't enough though, since |
|
I used this to get rbenv shell to work in fish: https://coderwall.com/p/6hja1w |
When invoking rbenv from fish shell, no environment variables set in your shell are passed. What's more, neither |
@espen has mentioned mine Coderwall protip, but there is updated version that allow partial Ruby name (the default will be choosen the newest one, still without completion). The Gist can be found there https://gist.github.com/5631243 (give it some love if you can). |
I understand that this issue has now been closed but I still wonder if we could get this feature implemented the right way. Am I right thinking that we'd only need to make sure that when I also understand that @sstephenson might not want to actively support the fish shell but perhaps we could try to implement an experimental compatibility in the beginning and I'm sure could get support from the fish shell community itself (they seem to be quite friendly and quite responsive as well). Presumably the file we'd need to change is https://github.com/sstephenson/rbenv/blob/master/libexec/rbenv-init Cheers |
Any fish user is welcome to improve the output of |
Problem is that fish isn't POSIX shell and it will be hard to implement |
@hauleth I think you may be mistaken. Based on the comments from @emcmanus and @sstephenson all we need to do is to get I'll fire off an email to the fish community mailing list and initiate the conversation, will try to get some help from the guys there. |
The original |
@bitboxer Fish shell should be fully supported by rbenv master. If you find that's not the case, please open a new issue. Thanks! |
Thank you "emcmanus" As "emcmanus" mentioned, if you are using fish shell then the following worked for me. TESTED IN
vi ~/.config/fish/config.fish set PATH $HOME/.rbenv/bin $PATH set PATH $HOME/.rbenv/shims $PATH rbenv rehash >/dev/null ^&1 Then exit fish and reload fish or just log off and back on again. If can't find the file then that means you just installed fish and did not ran it once. Just run fish and that folder will be created (file may not). This is fishfish not fish. |
Thanks @emcmanus and @sstephenson. |
Describe for Fish shell in details, prevent issues like rbenv#195 and rbenv#459. Reference: https://fishshell.com/docs/2.7/tutorial.html#tut_path
Describe for Fish shell in details, prevent issues like rbenv#195 and rbenv#459. Reference: https://fishshell.com/docs/2.7/tutorial.html#tut_path
Apparently the ^ syntax will be deprecated in the future and is broken in some versions (see this issue here). Therefore it may be better to use the following syntax instead: |
There's a typo in there rbenv rehash >/dev/null 2>&1 |
It would be very helpful is rbenv provided shims that were also fish shell compatible. It wouldn't be a huge change, but it'd mean that rbenv could be used in a non-bash/zsh shell. The syntax for fish is actually much more sane than bash.
The text was updated successfully, but these errors were encountered: