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

Re: _arguments broken again



Andrej Borsenkow wrote:

> bor@itsrm2%
> /tools/src/zsh/configure  --prefix=/tools --enable-zsh-debug --en-f-
> sTAB
> Completing
> 
> The first parameter was entered explicitly; the second was completed
> from --en-z-d; third parameter cannot be completed. The same with zsh -f.

Oops. Messed up description for automatically generated option specs.

Bye
 Sven

Index: Completion/Base/_arguments
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/_arguments,v
retrieving revision 1.29
diff -u -r1.29 _arguments
--- Completion/Base/_arguments	2000/08/01 07:18:43	1.29
+++ Completion/Base/_arguments	2000/08/01 11:18:27
@@ -87,9 +87,11 @@
     done
 
     # Then we walk through the descriptions plus a few builtin ones.
+    # The last one matches all options; the `special' description and action
+    # makes those options be completed without an argument description.
 
     set -- "$@" '*=FILE*:file:_files' \
-           '*=(DIR|PATH)*:directory:_files -/' '*: :'
+           '*=(DIR|PATH)*:directory:_files -/' '*: :  '
 
     while (( $# )); do
 
@@ -147,7 +149,7 @@
 
       if (( $#tmp )); then
         tmp=("${(@)tmp//[^a-zA-Z0-9-]}")
-        if [[ -n "$descr" ]]; then
+        if [[ -n "$descr" && "$descr" != ': :  ' ]]; then
 	  cache=( "$cache[@]" "${(@)^tmp}${descr}" )
         else
 	  cache=( "$cache[@]" "$tmp[@]" )

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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