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 `--'. It's in the change log as having happened between bash-4.0-alpha and bash-4.0 beta. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/