On 29 Mar 2013, at 18:27, Alain Matthes wrote:
# Get the paths to the two frontmost documents f1=$(osascript<<END […]
TextMate 2 does not support AppleScript.
An alternative would be to use TM_SELECTED_FILES and require documents to be selected in the file browser, using current document (TM_FILEPATH) with a selected one, or open a file dialog to select what the current one needs to be compared against.