zsh-workers
 help / color / mirror / code / Atom feed
* Re: Bug#457076: zsh: is-at-least does not work properly
       [not found] <20071219151458.GA4123@terra.galaxy>
@ 2007-12-19 19:19 ` Clint Adams
  2007-12-19 20:01   ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Clint Adams @ 2007-12-19 19:19 UTC (permalink / raw)
  To: Tonguc Yumruk, 457076; +Cc: zsh-workers

On Wed, Dec 19, 2007 at 05:15:09PM +0200, Tonguc Yumruk wrote:
> The is-at-least function in zsh (which is used in some other functions)
> uses setopt LOCAL_OPTIONS which is only available in ksh emulation mode.
> Instead it should use emulate -L zsh to use LOCAL_OPTIONS in zsh mode.
> Patch is attached.

What do you mean?

> 17c17
> < emulate zsh ; setopt LOCAL_OPTIONS
> ---
> > emulate -L zsh #; setopt LOCAL_OPTIONS


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug#457076: zsh: is-at-least does not work properly
  2007-12-19 19:19 ` Bug#457076: zsh: is-at-least does not work properly Clint Adams
@ 2007-12-19 20:01   ` Peter Stephenson
  2007-12-19 20:41     ` Tonguc Yumruk
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 2007-12-19 20:01 UTC (permalink / raw)
  To: Tonguc Yumruk, 457076, zsh-workers

On Wed, 19 Dec 2007 14:19:34 -0500
Clint Adams <schizo@debian.org> wrote:
> On Wed, Dec 19, 2007 at 05:15:09PM +0200, Tonguc Yumruk wrote:
> > The is-at-least function in zsh (which is used in some other functions)
> > uses setopt LOCAL_OPTIONS which is only available in ksh emulation mode.
> > Instead it should use emulate -L zsh to use LOCAL_OPTIONS in zsh mode.
> > Patch is attached.

"setopt LOCAL_OPTIONS" should work fine in all modes.  If there are places
where it doesn't that's a bug.

It would be more consistent to use "emulate -L zsh" here but it's
exactly equivalent to what's there already.

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug#457076: zsh: is-at-least does not work properly
  2007-12-19 20:01   ` Peter Stephenson
@ 2007-12-19 20:41     ` Tonguc Yumruk
  2007-12-19 21:46       ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Tonguc Yumruk @ 2007-12-19 20:41 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: 457076, zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

tonguc@terra:~% setopt LOCAL_OPTIONS
setopt: no such option: LOCAL_OPTIONS

On the other hand this works fine:

tonguc@terra:~% setopt localoptions

The ksh mode was my mistake. I misinterpreted the man page.

Thus saith Peter Stephenson :
> On Wed, 19 Dec 2007 14:19:34 -0500
> Clint Adams <schizo@debian.org> wrote:
> > On Wed, Dec 19, 2007 at 05:15:09PM +0200, Tonguc Yumruk wrote:
> > > The is-at-least function in zsh (which is used in some other functions)
> > > uses setopt LOCAL_OPTIONS which is only available in ksh emulation mode.
> > > Instead it should use emulate -L zsh to use LOCAL_OPTIONS in zsh mode.
> > > Patch is attached.
> 
> "setopt LOCAL_OPTIONS" should work fine in all modes.  If there are places
> where it doesn't that's a bug.
> 
> It would be more consistent to use "emulate -L zsh" here but it's
> exactly equivalent to what's there already.
> 
> -- 
> Peter Stephenson <p.w.stephenson@ntlworld.com>
> Web page now at http://homepage.ntlworld.com/p.w.stephenson/

-- 
Sevgi Saygı GNU/Linux
########################################################################
All seems condemned in the long run to approximate a state akin to
Gaussian noise.
		-- James Martin
########################################################################
Tonguç Yumruk

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug#457076: zsh: is-at-least does not work properly
  2007-12-19 20:41     ` Tonguc Yumruk
@ 2007-12-19 21:46       ` Peter Stephenson
  2007-12-19 22:13         ` Ismail Dönmez
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 2007-12-19 21:46 UTC (permalink / raw)
  To: Tonguc Yumruk, 457076, zsh-workers

On Wed, 19 Dec 2007 22:41:07 +0200
Tonguc Yumruk <tongucyumruk@fazlamesai.net> 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@csr.com>

	* 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@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug#457076: zsh: is-at-least does not work properly
  2007-12-19 21:46       ` Peter Stephenson
@ 2007-12-19 22:13         ` Ismail Dönmez
  0 siblings, 0 replies; 5+ messages in thread
From: Ismail Dönmez @ 2007-12-19 22:13 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

Wednesday 19 December 2007 23:46:04 tarihinde şunları yazmıştınız:
> On Wed, 19 Dec 2007 22:41:07 +0200
>
> Tonguc Yumruk <tongucyumruk@fazlamesai.net> 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@csr.com>
>
>         * 23219: Src/options.c: Ismail Dönmez reported that lower
>         casing of I to dotless i in tr_TR.UTF-8 broke option handling.

Yeah indeed, both  setopt LOCAL_OPTIONS and setopt localoptions work fine with 
tr_TR.UTF-8 locale here using zsh CVS.

Regards,
ismail

-- 
Never learn by your mistakes, if you do you may never dare to try again.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-12-19 22:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20071219151458.GA4123@terra.galaxy>
2007-12-19 19:19 ` Bug#457076: zsh: is-at-least does not work properly Clint Adams
2007-12-19 20:01   ` Peter Stephenson
2007-12-19 20:41     ` Tonguc Yumruk
2007-12-19 21:46       ` Peter Stephenson
2007-12-19 22:13         ` Ismail Dönmez

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).