From 4ff5dbfe9b347c3b31b7118c5a5f056221448f5e Mon Sep 17 00:00:00 2001 From: Christian Fredrik Johnsen Date: Wed, 11 Dec 2024 00:34:43 +0100 Subject: [PATCH] perf: remove unnecessary root variable, PYENV_ROOT already present. --- libexec/pyenv-init | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libexec/pyenv-init b/libexec/pyenv-init index 492360e6..5ace806a 100755 --- a/libexec/pyenv-init +++ b/libexec/pyenv-init @@ -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