2013-01-18 09:57:08 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
[ -n "$PYENV_DEBUG" ] && set -x
|
|
|
|
|
|
|
|
# Provide pyenv completions
|
|
|
|
if [ "$1" = "--complete" ]; then
|
|
|
|
exec pyenv-rehash --complete
|
|
|
|
fi
|
|
|
|
|
2013-12-26 04:48:43 +00:00
|
|
|
shell="$(basename "${PYENV_SHELL:-$SHELL}")"
|
2013-09-30 09:02:12 +00:00
|
|
|
|
2013-01-18 09:57:08 +00: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 09:02:12 +00:00
|
|
|
|
|
|
|
case "$shell" in
|
|
|
|
fish )
|
2013-12-26 04:48:43 +00:00
|
|
|
# no rehash support
|
2013-09-30 09:02:12 +00:00
|
|
|
;;
|
|
|
|
* )
|
2013-12-26 04:48:43 +00:00
|
|
|
echo "hash -r 2>/dev/null || true"
|
2013-09-30 09:02:12 +00:00
|
|
|
;;
|
|
|
|
esac
|