aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/plenv.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/shrc.d/plenv.sh')
-rw-r--r--sh/shrc.d/plenv.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/sh/shrc.d/plenv.sh b/sh/shrc.d/plenv.sh
new file mode 100644
index 00000000..6e03618e
--- /dev/null
+++ b/sh/shrc.d/plenv.sh
@@ -0,0 +1,17 @@
+# POSIX-compatible version of the plenv Bash shell wrapper
+[ -d "$HOME"/.plenv ] || return
+plenv() {
+ case $1 in
+ rehash)
+ shift
+ eval "$(plenv sh-rehash "$@")"
+ ;;
+ shell)
+ shift
+ eval "$(plenv sh-shell "$@")"
+ ;;
+ *)
+ command plenv "$@"
+ ;;
+ esac
+}