zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: _arguments broken again
Date: Tue, 1 Aug 2000 13:18:59 +0200 (MET DST)	[thread overview]
Message-ID: <200008011118.NAA06931@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Andrej Borsenkow"'s message of Tue, 1 Aug 2000 14:03:33 +0400


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@informatik.hu-berlin.de


             reply	other threads:[~2000-08-01 11:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-01 11:18 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-08-01 10:03 Andrej Borsenkow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200008011118.NAA06931@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).