zsh-workers
 help / color / mirror / code / Atom feed
* [patch] Useless use of ls
@ 2016-05-19  3:01 Matthew Martin
  0 siblings, 0 replies; only message in thread
From: Matthew Martin @ 2016-05-19  3:01 UTC (permalink / raw)
  To: zsh-workers

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
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-19  3:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19  3:01 [patch] Useless use of ls Matthew Martin

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).