[TxMt] Freeze Issue when Piping

Dave Grijalva grijalva at gmail.com
Sat Jan 20 00:55:40 UTC 2007


I'm working on an action to allow me to quickly open a url in textmate:

res=$(CocoaDialog inputbox --title "Open URL" \
    --informative-text "URL:" \
    --button1 "Okay" --button2 "Cancel")

[[ $(head -n1 <<<"$res") == "2" ]] && exit_discard

res=$(tail -n1 <<<"$res")
/usr/bin/env ruby -e "require 'net/http';require 'uri';Net::HTTP.get_print
URI.parse('$res')" | mate

Basically, I'm using ruby to grab the page and output the content to stdout,
then piping that to TextMate.  If i call this from the command line, it
works perfectly.  problem is, if i call this as an command from within
textmate, it completely freezed the app.  The page does open, but tm becomes
completely unresponsive and I have to quit and restart.  any ideas what I'm
doing wrong?

thanks
-dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070119/249d02b3/attachment.html>


More information about the textmate mailing list