On Monday 23 February 2009 08:48:32 Chet Ramey wrote:
> Mike Frysinger wrote:
> > previous versions of bash would happily accept negative values ( treated
> > as a signed integer and masked with like 0xff), but it seems some changes
> > related to option parsing has broken that
> >
> > $ f(){ return -1; }; f
> > -bash: return: -1: invalid option
> > return: usage: return [n]
>
> Bash still happily accepts the same negative return values; however, the
> `return' builtin was changed to use the standard option parsing rules
> like the rest of the builtins.  The effect is that arguments
> beginning with a `-' that are not to be treated as options must follow
> a `--'.

that makes negative values kind of useless imo and breaks backwards 
compatibility.  if 'return -1' isnt going to be fixed, then i'd just break it 
completely so as to force people to migrate to POSIX compliant behavior.

> It's in the change log as having happened between bash-4.0-alpha and
> bash-4.0 beta.

the changelog mentions options, not negative values.  they arent the same 
thing.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to