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

PATCH: sorry, cleanup



Trying Clint's problem again, I found some typos and a thinko in
`_arguments'.


Bye
 Sven

diff -u -r oldcompletion/Base/_arguments Completion/Base/_arguments
--- oldcompletion/Base/_arguments	Wed Sep 15 15:52:36 1999
+++ Completion/Base/_arguments	Wed Sep 15 16:43:28 1999
@@ -848,10 +848,10 @@
         compadd "$expl[@]" -Q -M 'r:|[_-]=* r:|=*' - "${PREFIX}" && ret=0
       fi
     else
-      tmp1=( "${(k)opts[@]}" "${(@k)odopts[(I)*[^=]]}" )
-      tmp1=( "${(@M)odescr:#(${(kj:|:)~tmp1}):*}" )
+      tmp1=( "${(@k)opts}" "${(@k)odopts[(I)*[^=]]}" )
+      tmp1=( "${(@M)odescr:#(${(j:|:)~tmp1}):*}" )
       tmp2=( "${(@M)odescr:#(${(kj:|:)~dopts}):*}" )
-      tmp3=( "${(@M)odescr:#(${(kj:|:)~odopts[(I)*=]}):*}" )
+      tmp3=( "${(@M)odescr:#(${(kj:|:)~odopts[(I)*=]%=}):*}" )
       _describe -o -c "$cmd" option \
         tmp1 -Q -M 'r:|[_-]=* r:|=*' -- \
         tmp2 -QS '' -M 'r:|[_-]=* r:|=*' -- \
@@ -860,8 +860,8 @@
   fi
 
   if [[ nm -eq compstate[nmatches] && 
-        ( -z "$single" ||
-          ( $#_args_cache_long -ne 0 && "$PREFIX" = --*=* ) ) ]]; then
+        ( ( -z "$single" && "$PREFIX" = [-+]*\=* ) ||
+          ( $#_args_cache_long -ne 0 && "$PREFIX" = --*\=* ) ) ]]; then
     tmp=( "${(@Mk)odopts:#[^:]#\=}" )
     prefix="${PREFIX#*\=}"
     suffix="$SUFFIX"

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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