TextMate support for ShellScript
Latest commit ba95d7b Mar 15, 2017 @mkhl mkhl Require terminator before function definition
The current grammar assumes it found a function whenever it encounters the keyword `function` followed by any word, which is too aggressive and can lead to false positives.
This change requires that the function definition is preceded by a terminator (`^|;|&`) and (optional) whitespace.

This approach can still produce false positives (it doesn’t recognise when the line break was escaped, for example) but should work well enough.
It also now includes the preceding whitespace in the `meta.function.shell` scope (due to the limitations on variable-width look-behinds), which I don’t like but also don’t see a way around.

We might want to consider doing something similar for loop constructs.

Closes #36

README.mdown

Installation

You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you.

General

License

If not otherwise specified (see below), files in this repository fall under the following license:

Permission to copy, use, modify, sell and distribute this
software is granted. This software is provided "as is" without
express or implied warranty, and with no claim as to its
suitability for any purpose.

An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”.