perf: remove unnecessary root variable, PYENV_ROOT already present.

This commit is contained in:
Christian Fredrik Johnsen 2024-12-11 00:34:43 +01:00
parent 38421ba6aa
commit 4ff5dbfe9b

View File

@ -60,8 +60,6 @@ if [ -z "$shell" ]; then
shell="${shell%%-*}"
fi
root="${0%/*}/.."
function main() {
case "$mode" in
"help")
@ -244,7 +242,7 @@ function print_env() {
}
function print_completion() {
completion="${root}/completions/pyenv.${shell}"
completion="${PYENV_ROOT}/completions/pyenv.${shell}"
if [ -r "$completion" ]; then
echo "source '$completion'"
fi