Skip to content

Instantly share code, notes, and snippets.

@czj
Created June 18, 2017 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save czj/40eba54b0435579a393e7998d3525603 to your computer and use it in GitHub Desktop.
Save czj/40eba54b0435579a393e7998d3525603 to your computer and use it in GitHub Desktop.
Fix for rbenv integration for fish shell
# 2017-06-06 : FIX RBENV / FISH
if not command -s rbenv > /dev/null
echo "rbenv: command not found. See https://github.com/rbenv/rbenv"
exit 1
end
set -l rbenv_root ''
if test -z "$RBENV_ROOT"
set rbenv_root "$HOME/.rbenv"
set -x RBENV_ROOT "$HOME/.rbenv"
else
set rbenv_root "$RBENV_ROOT"
end
set -x PATH $rbenv_root/shims $PATH
set -x RBENV_SHELL fish
if test ! -d "$rbenv_root/shims"; or test ! -d "$rbenv_root/versions"
command mkdir -p $rbenv_root/{shims,versions}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment