From ee2e1b5c5f066820eb3baee74ff893b0ca218e33 Mon Sep 17 00:00:00 2001 From: Vyacheslav Shcherbinin Date: Tue, 17 Oct 2023 14:42:00 +0700 Subject: [PATCH] Dont duplicate work when loading global binaries --- zsh-nvm.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-nvm.plugin.zsh b/zsh-nvm.plugin.zsh index 9c86862..1c25d9b 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -29,7 +29,7 @@ _zsh_nvm_global_binaries() { # If we have some, format them if [[ -n "$global_binary_paths" ]]; then - echo "$NVM_DIR"/v0*/bin/*(N) "$NVM_DIR"/versions/*/*/bin/*(N) | + echo $global_binary_paths | xargs -n 1 basename | sort | uniq