Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _rubber cleanup finale



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
 



Messages sorted by: Reverse Date, Date, Thread, Author