zsh-workers
 help / color / mirror / code / Atom feed
* pws-10: _arguments problem
@ 1999-12-03 14:46 Andrej Borsenkow
  0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 1999-12-03 14:46 UTC (permalink / raw)
  To: ZSH workers mailing list

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

/andrej


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: pws-10: _arguments problem
@ 1999-12-03 15:10 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-12-03 15:10 UTC (permalink / raw)
  To: zsh-workers


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-12-03 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-03 14:46 pws-10: _arguments problem Andrej Borsenkow
1999-12-03 15:10 Sven Wischnowsky

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).