On 26 Jan 2009, at 21:02, António Afonso wrote:
I was actually hoping to have the script directly in the bundle command, nonetheless, I've put the code in an external file and changed the command to:
The best way is to model your command like this:
#!/usr/bin/env ruby -KU
require "#{ENV['TM_BUNDLE_SUPPORT']}/lib/tm/detach"
TextMate.detach do # …your code here… end
This will properly detach the command (closing stdout/err) and if your command fails (exception) it will be presented in a nice dialog (now that stdout/err is gone).