aboutsummaryrefslogtreecommitdiff
path: root/rbenv/shrc.d
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-06-08 10:16:21 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-06-08 10:16:21 +1200
commit1646eb1ef78ddb739883e4c275266428acb882ef (patch)
treefea00b24e7bf0b424de15c9d1b5261179cb76264 /rbenv/shrc.d
parentMerge branch 'hotfix/v9.19.1' into develop (diff)
downloaddotfiles-1646eb1ef78ddb739883e4c275266428acb882ef.tar.gz
dotfiles-1646eb1ef78ddb739883e4c275266428acb882ef.zip
Add rbenv
Diffstat (limited to 'rbenv/shrc.d')
-rw-r--r--rbenv/shrc.d/plenv.sh21
1 files changed, 21 insertions, 0 deletions
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
+}