zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _rubber cleanup finale
@ 2005-07-23 14:22 Clint Adams
  0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2005-07-23 14:22 UTC (permalink / raw)
  To: zsh-workers

Use globbing rather than sed.

Index: Completion/Unix/Command/_rubber
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_rubber,v
retrieving revision 1.2
diff -u -r1.2 _rubber
--- Completion/Unix/Command/_rubber	23 Jul 2005 14:11:03 -0000	1.2
+++ Completion/Unix/Command/_rubber	23 Jul 2005 14:21:15 -0000
@@ -5,12 +5,12 @@
 eval $(rubber --version | sed 's/^.* \([^ ]*\): */_rubber_\1=/')
 if [[ ${_rubber_version#0} != $_rubber_version ]]; then
   _rubber_modules=(
-    $(ls $_rubber_path/rubber/modules | sed -n 's/^\([^_].*\)\.py$/\1/p')
+    $_rubber_path/rubber/modules/[^_]*.py(N:r:t)
   )
 else
   _rubber_modules=(
-    $(ls $_rubber_path/modules | sed -n 's/.rub$//p')
-    $(ls $_rubber_path/rubber/rules/latex | sed -n 's/^\([^_].*\)\.py$/\1/p')
+    $_rubber_path/modules/*.rub(N:r:t)
+    $_rubber_path/rubber/rules/latex/[^_]*.py(N:r:t)
   )
 fi
 


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

only message in thread, other threads:[~2005-07-23 14:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-23 14:22 PATCH: _rubber cleanup finale Clint Adams

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