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