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

Re: compadd -f with IPREFIX.



Tanaka Akira wrote:

> is27e1u11% cat <<'End' > Completion/User/_tst
> heredoc> #compdef tst
> heredoc> compset -P :
> heredoc> compadd -f - *
> heredoc> End
> 
> then, I get following.
> 
> is27e1u11% tst :Completion
> 
> I think zsh should complete a suffix "/".

addmatches() used the IPREFIX it got also as `ripre' (the expanded
form of the ignored prefix -- this is used for things like `~' and
`$foo/<TAB>'). The patch makes it use a NULL pointer there.

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Sat May  8 14:31:49 1999
+++ Src/Zle/zle_tricky.c	Tue May 18 09:07:49 1999
@@ -3734,7 +3735,7 @@
 		    continue;
 		}
 		if (doadd) {
-		    cm = add_match_data(isalt, ms, lc, dat->ipre, dat->ipre,
+		    cm = add_match_data(isalt, ms, lc, dat->ipre, NULL,
 					dat->isuf, dat->pre, dat->prpre,
 					dat->ppre, dat->psuf, dat->suf,
 					bpl, bsl, dat->flags, isexact);

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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