On Tue, May 04, 2010 at 05:29:48PM +0100, Stephane Chazelas wrote: > 2010-05-04 16:07:25 +0000, Gerrit Pape: > > On Tue, Oct 28, 2008 at 04:51:03PM +0000, Stephane Chazelas wrote: > > > Hiya, > > > > > > $ ash -c '. -- --help' > > > .: 1: --: not found > > > > > > The handling of "--" is mandated by POSIX I beleive. > > > > > > With ksh, pdksh, bash and in a POSIX script in general as POSIX > > > allows any "." implementation to recognise options, you have to > > > use: > > > > > > . -- "$1" > > > > > > if you can't guarantee that "$1" won't start with a "-". > > > > > > Unfortunately, that code doesn't work with ash, so a POSIX > > > script written in such a robust way will fail on those systems > > > where ash is the POSIX sh interpreter. > [...] > > the dot special builtin doesn't know about the -- option according to > > posix, and 'conforming application shall not use that argument'. > > > > See > > > > http://www.opengroup.org/onlinepubs/009695399/utilities/dot.html > > > > http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_14 > [...] > > Hi Gerrit, > > it does. See SUSv4 (POSIX 2008) > http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html#tag_17_04
That's the default, but there's something special about 'Special Built-Ins': http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_14 " Some of the special built-ins are described as conforming to XBD Utility Syntax Guidelines . For those that are not, the requirement in Utility Description Defaults that "--" be recognized as a first argument to be discarded does not apply and a conforming application shall not use that argument. " Regards, Gerrit. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org