Reformatted excerpts from John Bent's message of 2008-01-25:
> The hook works (system "open \'#{filename}\'"), but sup thinks it is
> failing.  I get a message saying view failed, displaying as text.
> Maybe it should be (! system "open \'#{filename}\'") ?

Weird. Kernel#system returns true if the command succeeded and false
otherwise, so it should work as is.

You could try:
  system "open '#{filename}'"
  $?.success?

But there's no reason that should work and the original shouldn't. You
don't have a debugging print statement or anything like that as the
final line of the hook, do you?

> Also, I added the \' because I noticed before that sometimes filename
> has spaces in it and then open won't work.

Good point. Backslashes optional though. :)

-- 
William <[EMAIL PROTECTED]>
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to