3 ms·
Don't rely on vim syntax highlighting. By default it highlights shell scripts according to original Bourne shell syntax rather than POSIX. See the note on this
by asb 16y ago
Don't rely on vim syntax highlighting. By default it highlights shell scripts according to original Bourne shell syntax rather than POSIX. See the note on this page http://www.pixelbeat.org/programming/shell_script_mistakes.html http://www.pixelbeat.org/programming/shell_script_mistakes.h... and this linked mailing list thread http://groups.google.com/group/vim_dev/t/41139a32772b2f5f http://groups.google.com/group/vim_dev/t/41139a32772b2f5f
- pyre 16y agoI'm not 'relying' on Vim, I'm just wondering. I got the impression that backticks were the only POSIX-approved way outside of Vim, but Vim highlighting it as such did help to re-enforce that idea (along with the exclusive usage of backticks in other people's code that was attempting to be strictly POSIX-compliant).
- asb 16y agoI didn't meant to come across as critical. That's a very reasonable conclusion to come to, and it's the reason why it's such a shame that vim upstream don't want to highlight #!/bin/sh scripts as POSIX syntax by default.