diff options
Diffstat (limited to 'rbenv')
-rw-r--r-- | rbenv/profile.d/rbenv.sh | 5 | ||||
-rw-r--r-- | rbenv/shrc.d/plenv.sh | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/rbenv/profile.d/rbenv.sh b/rbenv/profile.d/rbenv.sh new file mode 100644 index 00000000..52787b4d --- /dev/null +++ b/rbenv/profile.d/rbenv.sh @@ -0,0 +1,5 @@ +# Add rbenv to PATH and MANPATH if it appears to be in use +[ -d "$HOME"/.rbenv ] || return +PATH=$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH +MANPATH=$HOME/.rbenv/versions/$(ruby -e 'print "#{ RUBY_VERSION }"')/man:$MANPATH +export MANPATH diff --git a/rbenv/shrc.d/plenv.sh b/rbenv/shrc.d/plenv.sh new file mode 100644 index 00000000..ed9ddd03 --- /dev/null +++ b/rbenv/shrc.d/plenv.sh @@ -0,0 +1,21 @@ +# POSIX-compatible version of the rbenv Bash shell wrapper +[ -d "$HOME"/.rbenv ] || return +rbenv() { + case $1 in + rehash) + shift + eval "$(rbenv sh-rehash "$@")" + ;; + sh-rehash) + command rbenv "$@" + ;; + shell) + shift + eval "$(rbenv sh-shell "$@")" + ;; + *) + command rbenv "$@" + rbenv rehash + ;; + esac +} |