Last active
July 15, 2022 01:16
-
-
Save patorash/b5a1033c08d2c4df103457866b2dcaa2 to your computer and use it in GitHub Desktop.
fish and anyenv(rbenv, ndenv, goenv)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -x PATH $HOME/.anyenv/bin $PATH | |
# eval (anyenv init - fish) # not working... | |
# rbenv | |
set -x RBENV_ROOT "$HOME/.anyenv/envs/rbenv" | |
set -x PATH $PATH "$RBENV_ROOT/bin" | |
set -gx PATH "$RBENV_ROOT/shims" $PATH | |
set -gx RBENV_SHELL fish | |
source "$RBENV_ROOT/libexec/../completions/rbenv.fish" | |
command rbenv rehash 2>/dev/null | |
function rbenv | |
set command $argv[1] | |
set -e argv[1] | |
switch "$command" | |
case rehash shell | |
source (rbenv "sh-$command" $argv|psub) | |
case '*' | |
command rbenv "$command" $argv | |
end | |
end | |
# ndenv | |
set -x NDENV_ROOT "$HOME/.anyenv/envs/ndenv" | |
set -x PATH $PATH "$NDENV_ROOT/bin" | |
set -gx PATH "$NDENV_ROOT/shims" $PATH | |
set -gx NDENV_SHELL fish | |
command ndenv rehash 2>/dev/null | |
function ndenv | |
set command $argv[1] | |
set -e argv[1] | |
switch "$command" | |
case rehash shell | |
eval (ndenv sh-"$command" $argv|psub) | |
case '*' | |
command ndenv "$command" $argv | |
end | |
end | |
# goenv | |
set -x GOENV_ROOT "$HOME/.anyenv/envs/goenv" | |
set -x PATH $PATH "$GOENV_ROOT/bin" | |
set -gx PATH "$GOENV_ROOT/shims" $PATH | |
set -gx GOENV_SHELL fish | |
source "$GOENV_ROOT/libexec/../completions/goenv.fish" | |
command goenv rehash 2>/dev/null | |
function goenv | |
set command $argv[1] | |
set -e argv[1] | |
switch "$command" | |
case rehash shell | |
source (goenv "sh-$command" $argv|psub) | |
case '*' | |
command goenv "$command" $argv | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment