zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: pws-10: _arguments problem
Date: Fri, 3 Dec 1999 16:10:48 +0100 (MET)	[thread overview]
Message-ID: <199912031510.QAA00969@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Andrej Borsenkow"'s message of Fri, 3 Dec 1999 17:46:02 +0300


Andrej Borsenkow wrote:

> With stock pws-10:
> 
> bor@itsrm2:/tools/src/imap-4.7%> gdiff -u src/os/u/env_u<TAB>
> _arguments:comparguments:166: not enough arguments

_use_lo called _arguments without the `--' needed and _arguments
didn't test if it got any arguments.

Bye
 Sven

diff -u -r oldcompletion/Base/_arguments Completion/Base/_arguments
--- oldcompletion/Base/_arguments	Fri Dec  3 15:08:14 1999
+++ Completion/Base/_arguments	Fri Dec  3 16:00:17 1999
@@ -71,6 +71,7 @@
     lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(${~words[1]} --help 2>&1)//\[--/
 --}:#[ 	]#-*}//,/
 }}:#[ 	]#--*}#*--}%%[], ]*}:#}")
+    lopts=( "${(@)lopts:#--}" )
 
     # Now remove all ignored options ...
 
@@ -163,7 +164,7 @@
 
 _style -s options auto-description autod
 
-if comparguments -i "$autod" "$@"; then
+if (( $# )) && comparguments -i "$autod" "$@"; then
   local nm="$compstate[nmatches]" action noargs aret expl local
   local next direct odirect equal single match matched ws tmp1 tmp2 tmp3
   local opts subc prefix suffix
diff -u -r oldcompletion/User/_use_lo Completion/User/_use_lo
--- oldcompletion/User/_use_lo	Fri Dec  3 15:08:31 1999
+++ Completion/User/_use_lo	Fri Dec  3 15:53:52 1999
@@ -3,4 +3,4 @@
 # This is for GNU-like commands which understand the --help option,
 # but which do not otherwise require special completion handling.
 
-_arguments || _default
+_arguments -- || _default

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1999-12-03 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-03 15:10 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-12-03 14:46 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=199912031510.QAA00969@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).