Re: Proposed new POSIX sh policy
Bruce Sass <firstname.lastname@example.org> writes:
> Scripts specifying /bin/sh as their command interpreter (shell) must
> only use SUSv3 features or the following exceptions:
> - echo -n 
> - [ x -a y ] 
> - ... 
> Thus, the only shells allowed to be /bin/sh are those which are SUSv3
> compliant and implement the allowed exceptions to SUSv3. If a script
> requires non-SUSv3 features not explicitly excepted, the appropriate
> shell must be specified in the first line of the script (e.g.,
> #!/bin/bash) and the package must depend on the package providing the
> shell (unless the shell package is marked "Essential", as in the case
> of bash).
>  http://www.opengroup.org/onlinepubs/009695399/ POSIX, XSI, whatever
>  whatever its problem is
>  why -a is allowed
Make it a recommendation to use:
[ x ] && [ y ]
as alternative to "-a". The "-a" may cause problems because it does
not short circuilt, like the && would. Lintian could give a warning
and suggest maintainers to consider the "&&" choice.
Too bad lintian doesnät have "--pedantic" equivalent of gcc.