2013-01-18 04:57:08 -05:00
|
|
|
set -e
|
|
|
|
[ -n "$PYENV_DEBUG" ] && set -x
|
|
|
|
|
|
|
|
# Provide pyenv completions
|
|
|
|
if [ "$1" = "--complete" ]; then
|
|
|
|
exec pyenv-rehash --complete
|
|
|
|
fi
|
|
|
|
|
2013-12-25 23:48:43 -05:00
|
|
|
shell="$(basename "${PYENV_SHELL:-$SHELL}")"
|
2013-09-30 05:02:12 -04:00
|
|
|
|
2013-01-18 04:57:08 -05:00
|
|
|
# When pyenv shell integration is enabled, delegate to pyenv-rehash,
|
|
|
|
# then tell the shell to empty its command lookup cache.
|
|
|
|
pyenv-rehash
|
2013-09-30 05:02:12 -04:00
|
|
|
|
|
|
|
case "$shell" in
|
|
|
|
fish )
|
2013-12-25 23:48:43 -05:00
|
|
|
# no rehash support
|
2013-09-30 05:02:12 -04:00
|
|
|
;;
|
|
|
|
* )
|
2013-12-25 23:48:43 -05:00
|
|
|
echo "hash -r 2>/dev/null || true"
|
2013-09-30 05:02:12 -04:00
|
|
|
;;
|
|
|
|
esac
|