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