Tony Mechelynck wrote: > #!/bin/sh scripts are supposed to be for sh (the "old Bourne shell"), > not bash or ksh. If you want them to be highlighted as bash scripts, > then replace #!/bin/sh by #!/bin/bash. Quoting lines 2431 to 2435 of > syntax.txt: > >> If there's no "#! ..." line, and the user hasn't availed himself/herself of a >> default sh.vim syntax setting as just shown, then syntax/sh.vim will assume >> the Bourne shell syntax. No need to quote RFCs or market penetration >> statistics in error reports, please -- just select the default version of the >> sh your system uses in your <.vimrc>.
It seems like others have reported this issue then. I would suggest that now, /bin/sh usually means POSIX compliant sh as per: http://www.opengroup.org/onlinepubs/009695399/ For example if I want to write a script that runs on fedora ( /bin/sh -> bash ) or ubuntu ( /bin/sh -> dash ), then it needs to be a #!/bin/sh script. 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. cheers, Pádraig. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
