aboutsummaryrefslogtreecommitdiff
path: root/pyenv
diff options
context:
space:
mode:
Diffstat (limited to 'pyenv')
-rw-r--r--pyenv/profile.d/pyenv.sh5
-rw-r--r--pyenv/shrc.d/pyenv.sh18
2 files changed, 23 insertions, 0 deletions
diff --git a/pyenv/profile.d/pyenv.sh b/pyenv/profile.d/pyenv.sh
new file mode 100644
index 00000000..296df3ac
--- /dev/null
+++ b/pyenv/profile.d/pyenv.sh
@@ -0,0 +1,5 @@
+# Define env vars for pyenv if it appears to be in use
+[ -d "$HOME"/.pyenv ] || return
+PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
+MANPATH=$HOME/.pyenv/versions/$(python -V|cut -d' ' -f2)/share/man:$MANPATH
+export MANPATH
diff --git a/pyenv/shrc.d/pyenv.sh b/pyenv/shrc.d/pyenv.sh
new file mode 100644
index 00000000..1c90f8f2
--- /dev/null
+++ b/pyenv/shrc.d/pyenv.sh
@@ -0,0 +1,18 @@
+# POSIX-compatible version of the pyenv Bash shell wrapper
+[ -d "$HOME"/.pyenv ] || return
+pyenv() {
+ case $1 in
+ rehash)
+ shift
+ eval "$(pyenv sh-rehash "$@")"
+ ;;
+ shell)
+ shift
+ eval "$(pyenv sh-shell "$@")"
+ ;;
+ *)
+ command pyenv "$@"
+ ;;
+ esac
+}
+pyenv rehash