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

PATCH: files attributes not colored by complist



This is just a cosmetic patch so that complist 
does not color files' attributes (as does GNU ls).


--- Src/Zle/complist.c.old	Thu Oct 21 13:47:02 1999
+++ Src/Zle/complist.c	Sun Oct 24 20:13:48 1999
@@ -401,6 +401,13 @@
 	nicezputs((m->disp ? m->disp : m->str), shout);
 	len = niceztrlen(m->disp ? m->disp : m->str);
 
+	if (m->gnum != mselect) {
+	    if (mcolors.cols[COL_EC])
+		tputs(mcolors.cols[COL_EC], 1, putshout);
+	    else
+		zcputs(&mcolors, COL_NO);
+	}
+
 	if (isset(LISTTYPES)) {
 	    if (buf)
 		putc(file_type(buf->st_mode), shout);
@@ -413,10 +420,13 @@
 	while (len-- > 0)
 	    putc(' ', shout);
 
-	if (mcolors.cols[COL_EC])
-	    tputs(mcolors.cols[COL_EC], 1, putshout);
-	else
-	    zcputs(&mcolors, COL_NO);
+	if (m->gnum == mselect) {
+	    if (mcolors.cols[COL_EC])
+		tputs(mcolors.cols[COL_EC], 1, putshout);
+	    else
+		zcputs(&mcolors, COL_NO);
+	}
+
 	if (!lastc) {
 	    zcputs(&mcolors, COL_NO);
 	    fputs("  ", shout);


-- 
Alexandre Duret-Lutz



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