zsh-workers
 help / color / mirror / code / Atom feed
* Re: other _arguments problems
@ 2000-02-14 10:51 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2000-02-14 10:51 UTC (permalink / raw)
  To: zsh-workers


Tanaka Akira wrote:

> I found two other _arguments problems when I wrote _psutils.
> 
> Z(2):akr@is27e1u11% Src/zsh -f
> is27e1u11% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
> is27e1u11% zstyle ':completion*:messages' format '%d'
> is27e1u11% _tst () { _arguments '-x:arg:' }
> is27e1u11% tst -x<TAB>
> no arguments
> 
> It should insert ` '.

A missing re-activation of the option we are on.

> is27e1u11% _tst () { _arguments '-x' ':arg:' }
> is27e1u11% tst -<TAB>
> arg
> 
> It should insert `x '.

A result of 9452 which has been fixed by other means in the meantime.

Bye
 Sven

diff -ru ../z.old/Completion/Base/_arguments Completion/Base/_arguments
--- ../z.old/Completion/Base/_arguments	Mon Feb 14 11:28:56 2000
+++ Completion/Base/_arguments	Mon Feb 14 11:49:04 2000
@@ -254,7 +254,7 @@
         fi
       fi
 
-      if [[ -z "$matched$mesg" ]] && _requested options &&
+      if [[ -z "$matched" ]] && _requested options &&
           { ! zstyle -t ":completion:${curcontext}:options" prefix-needed ||
           [[ "$origpre" = [-+]* ||
              ( -z "$aret$mesg" && nm -eq compstate[nmatches] ) ]] } ; then
diff -ru ../z.old/Src/Zle/computil.c Src/Zle/computil.c
--- ../z.old/Src/Zle/computil.c	Mon Feb 14 11:29:26 2000
+++ Src/Zle/computil.c	Mon Feb 14 11:41:44 2000
@@ -1261,6 +1261,7 @@
 		    ca_laststate.ddef = ddef;
 		    ca_laststate.def = NULL;
 		    ca_laststate.opt = 1;
+		    state.curopt->active = 1;
 		} else {
 		    ca_laststate.doff = doff;
 		    ca_laststate.opt = 0;

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


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

* other _arguments problems
@ 2000-02-13  3:48 Tanaka Akira
  0 siblings, 0 replies; 2+ messages in thread
From: Tanaka Akira @ 2000-02-13  3:48 UTC (permalink / raw)
  To: zsh-workers

I found two other _arguments problems when I wrote _psutils.

Z(2):akr@is27e1u11% Src/zsh -f
is27e1u11% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
is27e1u11% zstyle ':completion*:messages' format '%d'
is27e1u11% _tst () { _arguments '-x:arg:' }
is27e1u11% tst -x<TAB>
no arguments

It should insert ` '.

is27e1u11% _tst () { _arguments '-x' ':arg:' }
is27e1u11% tst -<TAB>
arg

It should insert `x '.

zsh-3.1.6-pws-6 behaves as I expected.
-- 
Tanaka Akira


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

end of thread, other threads:[~2000-02-14 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-14 10:51 other _arguments problems Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
2000-02-13  3:48 Tanaka Akira

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