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

Schell efsubenovex at gmail.com
Sat Oct 10 17:12:33 UTC 2009


Ah, thanks!

On Sat, Oct 10, 2009 at 5:28 AM, Allan Odgaard <mailinglist at textmate.org> wrote:
> 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/
> <br>/'
>         echo '</pre>'
>     }
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>



-- 
Schell Scivally
efsubenovex at gmail.com
http://blog.efnx.com



More information about the textmate mailing list