rehash: drop redundant sort -u from make_shims call

register_shim() already deduplicates via associative array (bash 4+) or
string-containment check (bash 3.2). The sort -u pipe in the make_shims
call is 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.
This commit is contained in:
jakelodwick 2026-03-01 11:31:07 -08:00
parent 81befc1592
commit 0c71018897

View file

@ -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.