>>>>> "Nicolas" == Nicolas Joly <[EMAIL PROTECTED]> writes:

Nicolas> Hi,

Nicolas> I just updated and tested latest CVS autoconf under Digital
Nicolas> Unix v5.0.  I noticed a problem in _AC_INIT_PARSE_ARGS
Nicolas> (acgeneral.m4).

Nicolas> Many shells, such Digital Unix v5.0 /bin/sh , do not allow
Nicolas> use of `^' for negation inside brackets, in file name
Nicolas> expansion (used for case patterns).  They use `!' character
Nicolas> instead (BTW bash allow both).

Nicolas> Then, `*[!-a-zA-Z0-9_]*' should be preferred to
Nicolas> `*[^-a-zA-Z0-9_]*'.

Arg.  It's `funny' you talk about this, since this week-end I fell on
this in the documentation:

        @node Portable Shell, Multiple Cases, Run Time, Writing Tests
        @section Portable Shell Programming

        When writing your own checks, [...]  You should not use shell
        functions, aliases, negated character classes [...]

and was wondering when someone would complain.  You're too fast for me
:)

What do you think?  Personally, I am not against giving a chance to
`[!...]', but it has to be heavily tested.  Is there anybody who knows
more?

The test case is

case enable_foo in
  *[!a-zA-Z0-9_]*) echo Fail;;
  *) echo OK;;
esac

        Akim

Reply via email to