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

Re: :*pattern:message:action



Tanaka Akira wrote:

> I found that _arguments description `:*pattern:message:action' has a problem.
> 
> Z(2):akr@is27e1u11% Src/zsh -f
> is27e1u11% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
> is27e1u11% _tst () { _arguments '-x:*-?*:arguments for -x:' '-y' '-z' }
> is27e1u11% zstyle ':completion*:messages' format '%d'
> is27e1u11% tst -x a b c -y <TAB>
> arguments for -x
> 
> This doesn't complete `-y' and `-z'.  However they are completed by
> following command line, it is not intentional, I think.
> 
> is27e1u11% tst -x ab c -?* <TAB>

Indeed, missing tokenization.

Bye
 Sven

diff -ru ../z.old/Src/Zle/computil.c Src/Zle/computil.c
--- ../z.old/Src/Zle/computil.c	Wed Feb  2 09:34:50 2000
+++ Src/Zle/computil.c	Wed Feb  2 10:25:20 2000
@@ -717,6 +717,7 @@
 			    sav = *p;
 			    *p = '\0';
 			    end = dupstring(end);
+			    tokenize(end);
 			    *p = sav;
 			}
 			if (*p != ':') {

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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