Debian Codegraph @

libexec/pyenv-sh-rehash

raw symbols SCIP
1 #!/usr/bin/env bash
2 set -e
3 [ -n "$PYENV_DEBUG" ] && set -x
4
5 # Provide pyenv completions
6 if [ "$1" = "--complete" ]; then
7 exec pyenv-rehash --complete
8 fi
9
10 shell="$(basename "${PYENV_SHELL:-$SHELL}")"
11
12 # When pyenv shell integration is enabled, delegate to pyenv-rehash,
13 # then tell the shell to empty its command lookup cache.
14 case "$shell" in
15 pwsh)
16 echo "& (get-command pyenv -commandtype application) rehash"
17 ;;
18 *)
19 echo "command pyenv rehash"
20 esac
21
22 case "$shell" in
23 fish | pwsh )
24 # no executable cache
25 ;;
26 * )
27 echo "hash -r 2>/dev/null || true"
28 ;;
29 esac