On 17/06/08 01:41, Pádraig Brady wrote: > Pádraig Brady wrote: >> Perhaps you just need to change the default now so that is_posix=1 >> and if one really wants to write old bourne shell script they can >> set is_posix=0 in their .vimrc >> >> Note I think this is important as by default, the very useful >> $(..) and $((..)) constructs are highlighted as problematic and >> people can very easily think they're bash specific etc. > > I had a quick look around and noticed that this was reported previously: > > http://url.ie/g7d > https://bugs.launchpad.net/ubuntu/+source/vim/+bug/116893 > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=361177 > > So the question boils down to: should we change is_posix=1 by default? > > Chip states in one of the threads above that he doesn't want > to change that for backwards compatibility reasons. > I can see the reason for that, but the downside is that > on the vast minority of systems certain POSIX constructs > will not be flagged as errors in vim. The upside though > is that for the vast majority of systems, valid POSIX > constructs will not erroneously be flagged as errors. > > cheers, > Pádraig. > > 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. Best regards, Tony. -- Don't let your mind wander -- it's too little to be let out alone. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
