From 47871b2dc3aa788c000b6e49861939eefd106248 Mon Sep 17 00:00:00 2001 From: Jake Lodwick Date: Sun, 1 Mar 2026 14:36:24 -0700 Subject: [PATCH] rehash: drop redundant sort -u from make_shims call (#3410) register_shim() already deduplicates via associative array (bash 4+) or by checking if a shim already exists (bash 3.2). The sort -u pipe in the make_shims call is thus redundant -- the dedup happens downstream regardless. Shim creation is order-independent and idempotent, so sorting has no semantic effect either. Saves one subprocess fork during every rehash invocation. --- libexec/pyenv-rehash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/pyenv-rehash b/libexec/pyenv-rehash index 7ef7bf20..e2041301 100755 --- a/libexec/pyenv-rehash +++ b/libexec/pyenv-rehash @@ -196,7 +196,7 @@ shopt -s nullglob create_prototype_shim remove_outdated_shims # shellcheck disable=SC2046 -make_shims $(list_executable_names | sort -u) +make_shims $(list_executable_names) # Allow plugins to register shims.