Guys,
I'm currently trying to develop a command which gets some log from a cmd pipe and send the result of the TM command to the HTML output, just like that:
cmd_pipe = open("|my_long_script.sh 2>&1") cmd_pipe.each_line do |line| print line STDOUT.flush end cmd_pipe.close
This allows the web preview to be updated (better than the print `my_long_script.sh 2>&1' for that reason) while the command is processed. But my problem now is that the web preview does not got to the end of the file automatically... This is a bit painful while staring at the result of the command.
Do someone have an idea to force the web preview to scroll down each time the STDOUT is flushed? Or something like that.
Thanks in advance.
Best regards, Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart MSN: mathieu_godart@hotmail.com
ASIC Integration Manager Coolsand Technologies ___________________________________________
On 13 Mar 2009, at 02:46, Mathieu Godart wrote:
[...] Do someone have an idea to force the web preview to scroll down each time the STDOUT is flushed? Or something like that.
You need to locate the ‘tmCommand’ file of your command (in ~/ Library/Application Support/TextMate/Bundles/«your bundle»/Commands) then insert this after <dict>:
<key>autoScrollOutput</key> <true/>
Save that, probably afterwards you need to run (in Terminal):
touch ~/Library/Application\ Support/TextMate/Bundles/«your bundle»
Then select Bundles → Bundle Editor → Reload Bundles.
Allan,
Works great! I love you man. ;-)
Thanks.
Best regards, Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart MSN: mathieu_godart@hotmail.com
ASIC Integration Manager Coolsand Technologies ___________________________________________
Le 14 mars 09 à 15:46, Allan Odgaard a écrit :
On 13 Mar 2009, at 02:46, Mathieu Godart wrote:
[...] Do someone have an idea to force the web preview to scroll down each time the STDOUT is flushed? Or something like that.
You need to locate the ‘tmCommand’ file of your command (in ~/ Library/Application Support/TextMate/Bundles/«your bundle»/Commands) then insert this after <dict>:
<key>autoScrollOutput</key> <true/>
Save that, probably afterwards you need to run (in Terminal):
touch ~/Library/Application\ Support/TextMate/Bundles/«your
bundle»
Then select Bundles → Bundle Editor → Reload Bundles.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate