From 49f23771d3846e52717df86c16f8efefa7d6a301 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Mon, 29 Aug 2016 11:52:57 +0100 Subject: [PATCH] Use echo to list glob matches rather than ls ls falls back to current dir if there are no glob matches i.e right after install --- 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 3d2f064..cfab773 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -23,7 +23,7 @@ _zsh_nvm_install() { } _zsh_nvm_global_binaries() { - ls "$NVM_DIR"/v0*/bin/*(N) "$NVM_DIR"/versions/*/*/bin/*(N) | + echo "$NVM_DIR"/v0*/bin/*(N) "$NVM_DIR"/versions/*/*/bin/*(N) | xargs basename | sort | uniq