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

Re: compadd -f with IPREFIX.



Tanaka Akira wrote:

> In article <199905180954.LAA16898@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
>   Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:
> > So the question to everyone is: should we change this to make -[rR]
> > work even on automatically added suffixes?
> 
> It's consistent and useful, I suppose.

Yes, maybe. And since this is only with explicitly given characters or 
functions to remove the suffix, it won't interfere with previous
behavior anyway.

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Thu May 20 08:32:47 1999
+++ Src/Zle/zle_tricky.c	Fri May 21 15:13:30 1999
@@ -7112,9 +7112,13 @@
 		menuinsc++;
 		if (menuwe)
 		    menuend++;
-		if ((!menucmp || menuwe) && isset(AUTOREMOVESLASH)) {
-		    makesuffix(1);
-		    suffixlen['/'] = 1;
+		if (!menucmp || menuwe) {
+		    if (m->remf || m->rems)
+			makesuffixstr(m->remf, m->rems, 1);
+		    else if (isset(AUTOREMOVESLASH)) {
+			makesuffix(1);
+			suffixlen['/'] = 1;
+		    }
 		}
 	    }
 	}

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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