diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-12 23:14:47 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-12 23:56:20 +1200 |
commit | 4737f7e284946130d7e781454f2ed19c17fcdccf (patch) | |
tree | e7b68924061626de3dec64a44c97001be2d2a1c7 /pyenv | |
parent | Reformat README and fix a path or two (diff) | |
download | dotfiles-4737f7e284946130d7e781454f2ed19c17fcdccf.tar.gz dotfiles-4737f7e284946130d7e781454f2ed19c17fcdccf.zip |
Update plenv and add pyenv config
Diffstat (limited to 'pyenv')
-rw-r--r-- | pyenv/profile.d/pyenv.sh | 5 | ||||
-rw-r--r-- | pyenv/shrc.d/pyenv.sh | 18 |
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 |