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

Re: More intellegent suffix removing?



Andrej Borsenkow wrote:

> Consider:
> 
> bor@itsrm2:~%> l /S<TAB>
> bor@itsrm2:~%> l /SInus/      now I press ``;''
> bor@itsrm2:~%> l /SInus/;
> 
> note, that ``/'' is not removed, but in this case `;' can not be a part of
> current word (but \; or ';' or ";" can). Is it possible (does it make
> sense?) do make suffix removing follow Zsh grammar more closely?

The patch would be the thing below (are there any other characters
where this would be the right thing?). It looks a bit ugly when this
happens after typing a `<' or `>', though.

Bye
 Sven

diff -u os/Zle/zle_misc.c Src/Zle/zle_misc.c
--- os/Zle/zle_misc.c	Mon Jun  7 13:00:07 1999
+++ Src/Zle/zle_misc.c	Mon Jun  7 13:37:55 1999
@@ -787,7 +787,9 @@
 void
 makesuffix(int n)
 {
-    suffixlen[256] = suffixlen[' '] = suffixlen['\t'] = suffixlen['\n'] = n;
+    suffixlen[256] = suffixlen[' '] = suffixlen['\t'] = suffixlen['\n'] =
+	suffixlen[';'] = suffixlen['|'] = suffixlen['&'] = 
+	suffixlen['<'] = suffixlen['>'] = n;
 }
 
 /* Set up suffix for parameter names: the last n characters are a suffix *

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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