Yes, it's not common, but I need to use a grid computing network that has the default shell set to csh. Adding rbenv to the path is easy, but what about the init? Is there an rbenv that will work in csh?
rbenv doesn't depend on a particular shell to function.
If you have this in your shell startup file:
eval "$(rbenv init -)"
this should work with posix-compatible shells, but was not tested with csh and I'm not sure if it will work for you. So instead, you can simply add rbenv's shims to PATH:
# 1. Ensure rbenv is in PATH. This depends on rbenv install location, but typically:
export PATH=~/.rbenv/bin:"$PATH"
# 2. Ensure rbenv's shims are in PATH:
export PATH="$(rbenv root)/shims:$PATH"
If you initialize manually like this, most rbenv functionality will work, except for rbenv shell
command which will be unavailable.
I have found that Rbenv is actually dependent on Bash.
If you are under Freebsd, the easiest is to install rbenv from the port or pkg, which will install Bash automatically.
I have created a full solution for rbenv using tcsh that allows for "rbenv shell" and "rbenv rehash" as well as a simple replacement for the "rbenv init" and shell completions as well!
You can read about and download (creative commons attribution license) the solution at:
http://solutions.davesource.com/20160301.Ruby-rbenv-tcsh-csh-Complete-Solution/
Thanks Dave!
Most helpful comment
I have created a full solution for rbenv using tcsh that allows for "rbenv shell" and "rbenv rehash" as well as a simple replacement for the "rbenv init" and shell completions as well!
You can read about and download (creative commons attribution license) the solution at:
http://solutions.davesource.com/20160301.Ruby-rbenv-tcsh-csh-Complete-Solution/