[TxMt] Re: how to do HTML <pre>-wrapped output in TextMate 2?

Allan Odgaard mailinglist at textmate.org
Sun Jan 12 04:11:57 UTC 2014


On 11 Jan 2014, at 2:10, Matt Neuburg wrote:

> […] Unfortunately all the output appears at once; it would be nice 
> to get each line of output to appear as it arrives. But one can't have 
> everything...

This has to do with your “o.read”.

> TextMate::Executor.run() is worth knowing about, but I couldn't get it 
> to work in this case, as it seems to expect a Ruby file.

It’s not expecting a ruby file, however, it is made for running 
something via an interpreter and arguments needs to be split up, e.g. 
this works (tested it):

     TextMate::Executor.run("/usr/bin/seq", "10", "5", "50", 
:use_hashbang => false)

Without the :use_hashbang set to false, it will try to find the 
interpreter via the last argument (if it’s a file).

There is still a minor issue in that it will initially run the 
interpreter (first argument) with “--version” to show what version 
is being used (in the output window). The actual argument can be 
changed, but there is no way to disable the feature (but there probably 
should be).


More information about the textmate mailing list