On Fri, 16 Jan 1998, Adrian Bridgett wrote: > On Fri, Jan 16, 1998 at 10:40:43AM +1100, Hamish Moffatt wrote: > > On Fri, Jan 16, 1998 at 12:08:47AM +0100, Remco Blaakmeer wrote: > > > Yes, I can only agree. But is bash actually completely POSIX-compliant > > > (and nothing more than that) when called as /bin/sh ? > > > > It would appear not: > > > > sh-2.01$ echo hello {there,world} > > hello there world > > In fact even being called as "sh --posix" it does this. I'm fairly sure that > there is an option to turn brace expansion off though. > > However is this being non-POSIX or merely an extension ontop of POSIX? I > _like_ brace expansion and would be a bit miffed (to say the least) if it > got turned off by default. A quick check shows that ksh also does brace > expansion, but (pd)ksh doesn't.
If a shell says "when called as sh, I am POSIX-compliant", can we file a bug to any non-POSIX feature it has when called as sh? Scripts that use sh might depend on brace expansion not to happen. > The original policy was more "your scripts shouldn't use non-POSIX features > if they are run using /bin/sh" than anything else. Yes, but policies can be adapted. The above line should remain in the policy, of course. > I can't check with the original post, but personally I think that if a > script *does* use bash features then in addition to beginning "#!/bin/bash" > it should Depend: on bash. Eventually we could just have a POSIX compliant > shell in /bin and stop requiring bash (obviously this is a long term goal). No, packages shouldn't depend on essential packages. Almost every package needs bash for scripts etc. (even if it is only for {pre,post}{rm,inst}). Remco