[TxMt] Re: Problem with Changes bundle

Alain Matthes alain.matthes at mac.com
Fri Mar 29 17:27:39 UTC 2013


Le 29 mars 2013 à 16:54, Alain Matthes <alain.matthes at mac.com> a écrit :

> Hi,
> 
> I work with Changes Version 1.6.2 (582) and I install the bundle for Textmate.
> But with TM2 i get a bug when I try to compare files with Compare two front documents .
> 
> Textmate blocks and I can't do nothing
> 

More information : I can use  Selected Files in Project Drawer like with Diff bundle but I prefer
 to use the two front documents.

The command for front documents is :

#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"

# Compare the two frontmost documents

# This is the way it _ought_ to work
# $f1=osascript -e 'tell app "TextMate" to return path of document 1'
# $f2=osascript -e 'tell app "TextMate" to return path of document 2'

# Get the paths to the two frontmost documents
f1=$(osascript<<END
tell application "TextMate"
	set theFile to path of document 1
	set the result to POSIX path of theFile
end tell
END)

f2=$(osascript<<END
tell application "TextMate"
	set theFile to path of document 2
	set the result to POSIX path of theFile
end tell
END)

# And send them too the comparison tool
# diff -u "$f1" "$f2"
# opendiff "$f1" "$f2"
# bbdiff --ignore-spaces "$f1" "$f2"
chdiff "$f1" "$f2"

but I'm not an expert with applescript

Best regards

Alain Matthes


More information about the textmate mailing list