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

Re: Bug#457076: zsh: is-at-least does not work properly



On Wed, 19 Dec 2007 22:41:07 +0200
Tonguc Yumruk <tongucyumruk@xxxxxxxxxxxxxx> wrote:
> tonguc@terra:~% setopt LOCAL_OPTIONS
> setopt: no such option: LOCAL_OPTIONS
> 
> On the other hand this works fine:
> 
> tonguc@terra:~% setopt localoptions

I wonder if that's a function of your locale ($LANG setting)?  It's
possible it's not translating upper case characters to lower case
properly.  Ah, in fact it probably is...

2007-03-15  Peter Stephenson  <pws@xxxxxxx>

	* 23219: Src/options.c: Ismail Dönmez reported that lower
	casing of I to dotless i in tr_TR.UTF-8 broke option handling.

I would guess you'll find that any option with an upper case I in it
won't work properly.

Now I look, I've found I've missed a place that needs this fix (although
it doesn't apply here).

Index: Src/options.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/options.c,v
retrieving revision 1.37
diff -u -r1.37 options.c
--- Src/options.c	18 Jun 2007 13:25:05 -0000	1.37
+++ Src/options.c	19 Dec 2007 21:46:08 -0000
@@ -571,7 +571,9 @@
 		if (*t == '_')
 		    chuck(t);
 		else {
-		    *t = tulower(*t);
+		    /* See comment in optlookup() */
+		    if (*t >= 'A' && *t <= 'Z')
+			*t = (*t - 'A') + 'a';
 		    t++;
 		}
 


-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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