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

Re: Bug#289442: zsh: completions do not respect LC_COLLATE



> I think we could change the character comparison at the end of
> setbpcmp() to a strcoll(), or do setxfrm()'s at the beginning.

This does the trick.  I'll refrain from committing in case there's
an unacceptable performance hit or side effect.

Index: Src/Zle/zle_tricky.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v
retrieving revision 1.45
diff -u -r1.45 zle_tricky.c
--- Src/Zle/zle_tricky.c	2 Jun 2004 22:15:02 -0000	1.45
+++ Src/Zle/zle_tricky.c	9 Jan 2005 16:09:21 -0000
@@ -1907,7 +1907,11 @@
 	    }
 	}
     }
+#ifndef HAVE_STRCOLL
     return (int)(*a - *b);
+#else
+    return strcoll(a,b);
+#endif
 }
 
 /* This is used to print the strings (e.g. explanations). *



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