[TxMt] preview in localhost

salvo salvo at scicli.com
Thu Oct 6 13:23:58 UTC 2005


Il giorno 06/ott/05, alle ore 12:19, Allan Odgaard ha inviato questo  
messaggio:

>
> You probably want:
>
>    open "`echo $TM_FILEPATH | sed "s|.*/$USER/Desktop/\(.*\)|http:// 
> localhost/~$USER/desktop/\1|"`"

ok!
this line works well and open a .pl page on desktop ad cgi in localhost.

>
> Btw: instead of opening the URL, you can also set the commands  
> output to HTML and then let it redirect to the URL, so you'll view  
> the page inside TextMate:
>    echo "<meta http-equiv='Refresh' content='0;URL=http://localhost/ 
> ~$USER${TM_FILEPATH#$HOME}'>"

thanks, a good tip, this one!

>
> I recently blogged about both shell variable substitutions and HTML  
> output capabilities:
>    http://macromates.com/blog/archives/2005/09/28/html-output-for- 
> commands/
>    http://macromates.com/blog/archives/2005/09/26/shell-variables/

I must read them soon, thanks!

REgards

Salvo



More information about the textmate mailing list