[TxMt] Re: Using tail -f for HTML output

Allan Odgaard mailinglist at textmate.org
Sat Oct 10 12:28:34 UTC 2009

On 10 Oct 2009, at 00:46, Schell wrote:

> Allan, any word on how piping to 'pre' works? […]

It’s a short bash function defined here: http://svn.textmate.org/trunk/Support/lib/bash_init.sh

     # use this as a filter (|pre) when you want
     # raw output to show as such in the HTML output
     pre () {
         echo -n '<pre style="word-wrap: break-word;">'
         perl -pe '$| = 1; s/&/&/g; s/</</g; s/>/>/g; s/$\\n/ 
         echo '</pre>'

More information about the textmate mailing list