Subject: [patch] Useless use of ls
From: Matthew Martin <[email-masked]>
To: [email-masked]
Date: Wed, 18 May 2016 22:01:35 -0500
List-Id: Zsh Workers List <zsh-workers.zsh.org>

diff --git a/Completion/Linux/Command/_vserver b/Completion/Linux/Command/_vserver
index 2401387..36a61c4 100644
--- a/Completion/Linux/Command/_vserver
+++ b/Completion/Linux/Command/_vserver
@@ -95,7 +95,7 @@ _vserver_cache_cfgdir() {
 _vserver_cache_vsnames() {
   if [[ "$_cache_vserver_vsnames_initialized" != true ]]; then
     typeset -ga _cache_vserver_vsnames
-    _cache_vserver_vsnames=( $(ls -d $_cache_vserver_cfgdir/*/ | sed -e s,$_cache_vserver_cfgdir,, | tr -d '/') )
+    _cache_vserver_vsnames=( $_cache_vserver_cfgdir/*(/:t) )
     _cache_vserver_vsnames_initialized=true
   fi
 }