aboutsummaryrefslogtreecommitdiff
path: root/rbenv/shrc.d/plenv.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-06-08 11:24:46 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-06-08 11:24:46 +1200
commita439613b4fe9c24746a42a4a0f59972079538e2e (patch)
treeaa3ae9e3ee0f0ba69b92a19c137a30a30d72701b /rbenv/shrc.d/plenv.sh
parentMerge branch 'hotfix/v9.19.1' (diff)
parentUpdate dotfiles(7) manual page (diff)
downloaddotfiles-a439613b4fe9c24746a42a4a0f59972079538e2e.tar.gz
dotfiles-a439613b4fe9c24746a42a4a0f59972079538e2e.zip
Merge branch 'release/v9.20.0'v9.20.0
* release/v9.20.0: Update dotfiles(7) manual page Add a reader quote to vimrc Adjust layout of quote Add mention of plenv,pyenv,rbenv config to README Add rbenv
Diffstat (limited to 'rbenv/shrc.d/plenv.sh')
-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
+}