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

PATCH: file type characters after slash



In the mail I just sent I promised to commit this patch. It keeps the
completion code from printing the file type characters for names
ending in a slash.

Bye
 Sven

Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.34
diff -u -r1.34 complist.c
--- Src/Zle/complist.c	2000/10/11 12:19:25	1.34
+++ Src/Zle/complist.c	2000/10/24 07:46:45
@@ -1241,7 +1241,8 @@
 			    goto end;
 			break;
 		    }
-		    if (!m->disp && (m->flags & CMF_FILE)) {
+		    if (!m->disp && (m->flags & CMF_FILE) &&
+			m->str[0] && m->str[strlen(m->str) - 1] != '/') {
 			struct stat buf;
 			char *pb;
 
Index: Src/Zle/compresult.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v
retrieving revision 1.25
diff -u -r1.25 compresult.c
--- Src/Zle/compresult.c	2000/10/11 12:19:25	1.25
+++ Src/Zle/compresult.c	2000/10/24 07:46:45
@@ -1886,7 +1886,8 @@
 			printm(g, NULL, mc, ml, (!i), wid, NULL, NULL);
 			break;
 		    }
-		    if (!m->disp && (m->flags & CMF_FILE)) {
+		    if (!m->disp && (m->flags & CMF_FILE) &&
+			m->str[0] && m->str[strlen(m->str) - 1] != '/') {
 			struct stat buf;
 			char *pb;
 

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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