about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-07-27 08:32:20 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-07-27 08:32:20 +0000
commitdcd2e04c8166ab0ad9a64f7f92ba9d83bfd18e47 (patch)
tree4d4390f670abe681d1d0502743b454c7c9e3ad87
parent244538985d16c4ac60c3aaf3eb65a804afdbf077 (diff)
downloadzsh-dcd2e04c8166ab0ad9a64f7f92ba9d83bfd18e47.tar.gz
zsh-dcd2e04c8166ab0ad9a64f7f92ba9d83bfd18e47.tar.xz
zsh-dcd2e04c8166ab0ad9a64f7f92ba9d83bfd18e47.zip
zsh-workers:7285
-rw-r--r--Completion/User/_cvs41
1 files changed, 21 insertions, 20 deletions
diff --git a/Completion/User/_cvs b/Completion/User/_cvs
index bd59bdcd3..66c031f36 100644
--- a/Completion/User/_cvs
+++ b/Completion/User/_cvs
@@ -157,7 +157,7 @@ _cvsprefix () {
 _cvsentries () {
   setopt localoptions nullglob unset
   if [[ -f ${pref}CVS/Entries ]]; then
-      entries=( "${(@)${(@)${(@)${(f@)$(<${pref}CVS/Entries)}:#D}#(D|)/}%%/*}" )
+      entries=( ${${${${(f)"$(<${pref}CVS/Entries)"}:#D}#(D|)/}%%/*} )
   fi
 }
 
@@ -168,26 +168,27 @@ _cvsentries_modified () {
   local line Entries
   typeset -A mtime
 
+  if [[ -f "${pref}CVS/Entries" ]]; then
+    Entries="$(<${pref}CVS/Entries)"
+  fi
+
   if ! zmodload -e stat; then zmodload stat; fi
   if zmodload -e stat; then
-    if [[ -f "${pref}CVS/Entries" ]]; then
-      Entries="$(<${pref}CVS/Entries)"
-      mtime=( "${(@s:/:)${(j:/:)${(@)${(@)${(@)${(M@)${(f@)Entries}:#/*}#/}%/*/*}/\/*\///}}}" )
-      entries=( "${(@)${(@)${(M@)${(f@)Entries}:#D/*}#D/}%%/*}" )
-      builtin stat -n +mtime -F '%a %b %e %T %Y' "$pref${(@k)^mtime}" |
-      while read line
-      do
-	line=${line#$pref}
-	if [[ x"$mtime[${line%% *}]" == x"${line#* }" ]]; then
-	  #print up-to-date "${line%% *}"
-	else
-	  #print locally-modified "${line%% *}"
-	  entries=($entries "${line%% *}")
-	fi
-      done
-    fi
+    mtime=( ${(s:/:)${(j:/:)${${${${(M)${(f)Entries}:#/*}#/}%/*/*}/\\/*\\///}}} )
+    entries=( ${${${(M)${(f)Entries}:#D/*}#D/}%%/*} )
+    builtin stat -n +mtime -F '%a %b %e %T %Y' "$pref${(@k)^mtime}" |
+    while read line
+    do
+      line=${line#$pref}
+      if [[ x"$mtime[${line%% *}]" == x"${line#* }" ]]; then
+        #print up-to-date "${line%% *}"
+      else
+        #print locally-modified "${line%% *}"
+        entries=($entries "${line%% *}")
+      fi
+    done
   else
-    entries=( "${(@)${(@)${(@)${(f@)Entries}:#D}#(D|)/}%%/*}" )
+    entries=( ${${${${(f)Entries}:#D}#(D|)/}%%/*} )
   fi
 
   if (( $+OLDTZ )); then TZ="$OLDTZ"; else unset TZ; fi
@@ -210,7 +211,7 @@ _cvstargets_modified () {
 }
 
 _cvsrevisions () {
-  compadd - "${(@)${(@)${(@M)${(@f)$(cvs -q status -vl .)}:#	*}##[ 	]##}%%[ 	]*}"
+  compadd - ${${${(M)${(f)"$(cvs -q status -vl .)"}:#	*}##[ 	]##}%%[ 	]*}
 }
 
 _cvsrepositories () {
@@ -222,7 +223,7 @@ _cvsrepositories () {
   else
     compadd - \
       $root/^CVSROOT(:t) \
-      "${(@)${(@M)${(@f)$(<$root/CVSROOT/modules)}:#[^#]*}%%[ 	]*}"
+      ${${(M)${(f)"$(<$root/CVSROOT/modules)"}:#[^#]*}%%[ 	]*}
   fi
 }