summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2005-07-23 14:23:38 +0000
committerClint Adams <clint@users.sourceforge.net>2005-07-23 14:23:38 +0000
commit2bd556e744463c09556c3579f7100e46600bd5c3 (patch)
tree32f41234df87ce8ff540f398898561129df92855
parentd1f7c438b15f314625fbb8a3fdb89179ff246162 (diff)
downloadzsh-2bd556e744463c09556c3579f7100e46600bd5c3.tar.gz
zsh-2bd556e744463c09556c3579f7100e46600bd5c3.tar.xz
zsh-2bd556e744463c09556c3579f7100e46600bd5c3.zip
21506: use globbing instead of ls and sed.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_rubber6
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 7935f140a..c57eed5a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
 2005-07-23  Clint Adams  <clint@zsh.org>
 
-	* 21505: Completion/Unix/Command/_rubber: use an array for common
-	arguments rather than an additional function.
+	* 21505, 21506: Completion/Unix/Command/_rubber: use an array for
+	common arguments rather than an additional function, and use
+	globbing instead of ls and sed.
 
 	* 21504: Completion/Unix/Command/_xscreensaver,
 	Completion/X/Command/_xscreensaver: move xscreensaver-command
diff --git a/Completion/Unix/Command/_rubber b/Completion/Unix/Command/_rubber
index 91c220b41..611425636 100644
--- a/Completion/Unix/Command/_rubber
+++ b/Completion/Unix/Command/_rubber
@@ -5,12 +5,12 @@ local _rubber_version _rubber_path _rubber_modules _rubber_args
 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