Files
server/opt/psa/admin/plib/modules/nodejs/libexec/nodenv/nodenv-sh-rehash
2026-01-07 20:52:11 +01:00

24 lines
451 B
Bash
Executable File

#!/usr/bin/env bash
set -e
[ -n "$NODENV_DEBUG" ] && set -x
# Provide nodenv completions
if [ "$1" = "--complete" ]; then
exec nodenv-rehash --complete
fi
shell="$(basename "${NODENV_SHELL:-$SHELL}")"
# When nodenv shell integration is enabled, delegate to nodenv-rehash,
# then tell the shell to empty its command lookup cache.
nodenv-rehash
case "$shell" in
fish )
# no rehash support
;;
* )
echo "hash -r 2>/dev/null || true"
;;
esac