And: Could the rule for if-blocks in the shellscript bundle be more strict (matching only '^\s*if\b' for example)? Is this rule needed at all? (I haven’t found any other references to the scope “if-block” in the shellscript bundle.)
I think it could, best way to figure out is to make the change, test it, and submit a PR if you do not see any issues :)
Be sure not to assign any scope beyond meta.* to potentially matched leading whitespace.
Pull request: https://github.com/textmate/shellscript.tmbundle/pull/18
I decided not to delete the scope because there are similiar scopes like `meta.scope.while-loop.shell`, and though I couldn’t find any references to those scopes in any bundles I suspect they could be used for syntax highlighting.
(The `if-block` scope was introduced in https://github.com/textmate/shellscript.tmbundle/commit/3a30a60, but the commit message doesn’t say anything about why it was added.)
Stefan