Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Anthony Martinez <pi+sup@pihost.us>
To: sup-talk@rubyforge.org, sup-devel@rubyforge.org
Cc: Anthony Martinez <pi@pihost.us>
Subject: [sup-talk] [PATCH] If we have a COLUMNS environment variable, wrap to that instead of 80.
Date: Tue,  3 Nov 2009 20:05:19 -0700	[thread overview]
Message-ID: <1257303919-30524-1-git-send-email-pi+sup@pihost.us> (raw)

From: Anthony Martinez <pi@pihost.us>

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", <<EOS
-- 
1.6.5

_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


             reply	other threads:[~2009-11-04  3:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04  3:05 Anthony Martinez [this message]
2009-11-04  3:22 ` Anthony Martinez
2009-11-04  3:51 ` [sup-talk] [CORRECTED PATCH] If we can get the terminal width, use that for WRAP_LEN Anthony Martinez
2009-11-04 19:06 ` [sup-talk] [PATCH] If we have a COLUMNS environment variable, wrap to that instead of 80 Mark Alexander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1257303919-30524-1-git-send-email-pi+sup@pihost.us \
    --to=pi+sup@pihost.us \
    --cc=pi@pihost.us \
    --cc=sup-devel@rubyforge.org \
    --cc=sup-talk@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox