On Tue, Jun 17, at 01:57 Tony Mechelynck wrote:
> On 17/06/08 01:41, Pádraig Brady wrote:
> >
> > p.s. shouldn't the flag have been called is_posix_sh ?
> 
> It might have been called sh_is_posix, but it's too late for that -- 
> upwards compatibility again.
> 
> As for "erroneously" -- I agree with Bram that #!sh is supposed to mean 
> the original Bourne shell, not Bourne-again, not Korn, and quite 
> possibly before POSIX was invented. Anything which the original Bourne 
> shell did not support should not be used in a script starting #!sh (or 
> #!/bin/sh etc.) or else someday you'll feed one of these scripts to a 
> surviving copy of the original Bourne (not-again) shell and be surprised 
> that it doesn't work.
> 
>

While compatibility is an important factor, at the same time could be a
block to evolution.

The fact is that 'sh' *is* the standard interpreter [1] and since $((..))
construct is a valid POSIX syntax shouldn't be treated as an error by
default.
I have the "g:is_posix = 1" setting in one of the initialized files
because my 'sh' is a symbolic link to 'dash' which is a standard POSIX
shell [2].
And I choose 'dash' because I wanted to have valid POSIX scripts that can
be work in every system that has a POSIX shell; and is generally
accepted that 'sh' should be symbolic link to a POSIX  compliant shell. If
it isn't (a POSIX compliant shell), then it's a system error, or this
system doesn't care about standards and the $((...) should be treated as
an error in this system and it's the time for "g:is_posix = 0".

So I have to agree with Pádraig if my opinion matters.

1. http://www.opengroup.org/onlinepubs/009695399/utilities/sh.html
2. http://en.wikipedia.org/wiki/Debian_Almquist_shell

> Best regards,
> Tony.

Regards,

Ag.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui