From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.79.9 with SMTP id c9cs71330agb; Tue, 3 Nov 2009 19:13:55 -0800 (PST) Received: by 10.224.100.13 with SMTP id w13mr454154qan.292.1257304434328; Tue, 03 Nov 2009 19:13:54 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 34si891284qyk.59.2009.11.03.19.13.54; Tue, 03 Nov 2009 19:13:54 -0800 (PST) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id E38153C8060; Tue, 3 Nov 2009 22:13:53 -0500 (EST) X-Greylist: delayed 504 seconds by postgrey-1.31 at rubycentral.org; Tue, 03 Nov 2009 22:13:45 EST Received: from mail.cnsp.com (mail.cnsp.com [208.3.80.17]) by rubyforge.org (Postfix) with ESMTP id 2F4BC1598031; Tue, 3 Nov 2009 22:13:47 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.cnsp.com (Postfix) with ESMTP id 8A202D45B5C1; Tue, 3 Nov 2009 20:05:20 -0700 (MST) X-Virus-Scanned: Debian amavisd-new at cnsp.biz Received: from mail.cnsp.com ([127.0.0.1]) by localhost (mail.cnsp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ohqpZtU+IIao; Tue, 3 Nov 2009 20:05:20 -0700 (MST) Received: from home.mrtheplague.net (coffeehost.tcct.nmt.edu [129.138.3.50]) by mail.cnsp.com (Postfix) with SMTP id 2B1B3D45B5BA; Tue, 3 Nov 2009 20:05:20 -0700 (MST) Received: by home.mrtheplague.net (Postfix, from userid 1000) id 7ACA684E2E60; Tue, 3 Nov 2009 20:05:19 -0700 (MST) From: Anthony Martinez To: sup-talk@rubyforge.org, sup-devel@rubyforge.org Date: Tue, 3 Nov 2009 20:05:19 -0700 Message-Id: <1257303919-30524-1-git-send-email-pi+sup@pihost.us> X-Mailer: git-send-email 1.6.5 Cc: Anthony Martinez Subject: [sup-talk] [PATCH] If we have a COLUMNS environment variable, wrap to that instead of 80. X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org From: Anthony Martinez I find that this provides a much smoother terminal experience, especially with dumped HTML output. At least on Linux+zsh, this environment variable is automatically updated, and if it doesn't exist, sup will continue to happily default to 80. --- lib/sup/message-chunks.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index 581b707..881ac4b 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -41,7 +41,7 @@ end module Redwood module Chunk - WRAP_LEN = 80 # wrap messages and text attachments at this width + WRAP_LEN = ENV["COLUMNS"] || 80 # wrap messages and text attachments at this width class Attachment HookManager.register "mime-decode", <