From: BenoƮt PIERRE Date: Tue, 11 Aug 2009 22:09:41 +0000 (+0200) Subject: use BufferManager.shell_out to call run-mailcap instead of system X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=149062cdd1a87fa762937efffd51e6d5d0a06e06;p=sup use BufferManager.shell_out to call run-mailcap instead of system This ensure ncurses state is correctly restored upon command completion. --- diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index 4c947e1..1910abd 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -133,7 +133,7 @@ EOS def view_default! path cmd = "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}'" Redwood::log "running: #{cmd.inspect}" - system cmd + BufferManager.shell_out(cmd) $? == 0 end