* [sup-talk] [PATCH] change opening attachements on darwin to use open instead of run-mailcap
@ 2009-10-28 22:06 Jonah
2009-10-30 22:07 ` William Morgan
2009-10-30 23:13 ` Jon Dugan
0 siblings, 2 replies; 3+ messages in thread
From: Jonah @ 2009-10-28 22:06 UTC (permalink / raw)
To: sup-talk
Hey everyone,
I've been working on getting sup to work in MacOSX (darwin). MacOSX has a special command (open) for opening files - there is no support for mailcap. This patch uses case to run the appropriate command depending on the architecture used.
I still haven't gotten sup to send mail yet,.. so more patches for MacOSX will probably be forthcoming. :)
I'm loving sup so far, keep up the great work!
Cheers,
Jonah
---
lib/sup/message-chunks.rb | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
index edc40c4..581b707 100644
--- a/lib/sup/message-chunks.rb
+++ b/lib/sup/message-chunks.rb
@@ -132,7 +132,12 @@ EOS
def initial_state; :open end
def viewable?; @lines.nil? end
def view_default! path
- cmd = "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}'"
+ case Config::CONFIG['arch']
+ when /darwin/
+ cmd = "open '#{path}'"
+ else
+ cmd = "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}'"
+ end
debug "running: #{cmd.inspect}"
BufferManager.shell_out(cmd)
$? == 0
--
1.6.3.3
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [sup-talk] [PATCH] change opening attachements on darwin to use open instead of run-mailcap
2009-10-28 22:06 [sup-talk] [PATCH] change opening attachements on darwin to use open instead of run-mailcap Jonah
@ 2009-10-30 22:07 ` William Morgan
2009-10-30 23:13 ` Jon Dugan
1 sibling, 0 replies; 3+ messages in thread
From: William Morgan @ 2009-10-30 22:07 UTC (permalink / raw)
To: sup-talk
Reformatted excerpts from Jonah's message of 2009-10-28:
> I've been working on getting sup to work in MacOSX (darwin). MacOSX has a
> special command (open) for opening files - there is no support for mailcap.
> This patch uses case to run the appropriate command depending on the
> architecture used.
Branch no-mailcap-on-darwin, merged into next. Thanks!
> I still haven't gotten sup to send mail yet,.. so more patches for
> MacOSX will probably be forthcoming. :)
Great, glad to have them.
--
William <wmorgan-sup@masanjin.net>
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [sup-talk] [PATCH] change opening attachements on darwin to use open instead of run-mailcap
2009-10-28 22:06 [sup-talk] [PATCH] change opening attachements on darwin to use open instead of run-mailcap Jonah
2009-10-30 22:07 ` William Morgan
@ 2009-10-30 23:13 ` Jon Dugan
1 sibling, 0 replies; 3+ messages in thread
From: Jon Dugan @ 2009-10-30 23:13 UTC (permalink / raw)
To: sup-talk
Excerpts from Jonah's message of Wed Oct 28 17:06:43 -0500 2009:
> I still haven't gotten sup to send mail yet,.. so more patches for MacOSX will
> probably be forthcoming. :)
I use msmtp via MacPorts to send mail from OS X. The sup wiki has some
information on how to use msmtp in the "how mail leaves" section:
http://sup.rubyforge.org/wiki/wiki.pl
And the MacPorts homepage is at:
http://macports.org/
Jon
--
Jon M. Dugan <jdugan@es.net>
ESnet Network Engineering Group
Lawrence Berkeley National Laboratory
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-30 23:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-28 22:06 [sup-talk] [PATCH] change opening attachements on darwin to use open instead of run-mailcap Jonah
2009-10-30 22:07 ` William Morgan
2009-10-30 23:13 ` Jon Dugan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox