Subject: bug#6195: closed (Re: bug#6195: Feature Request for "fold")

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 07 Jun 2010 23:33:02 +0000

Your bug report

#6195: Feature Request for "fold"

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
6195: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6195
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#6195: Feature Request for "fold"
From: Bob Proulx <[email-masked]>
To: BJ Dierkes <[email-masked]>
Cc: [email-masked]
Date: Mon, 7 Jun 2010 17:32:41 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

BJ Dierkes wrote:
> Pádraig Brady wrote:
> >> $ git --no-pager log --oneline | fold -s
> > 
> > `fmt` seems to nearly do what you want,
> > and with a little sed you can line up correctly:
> > 
> >  fmt -t | sed 's/^   /        /'
> > 
> > I'm not against a --indent option to fold
> > but with the overlap between fmt,pr,fold,sed
> > the barrier to new options to these utils is high.
> 
> Thank you for the quick reply.  Your response makes complete sense.

Since everyone seems satisfied with the situation I am going to close
the bug report in the bug tracking system with this message.

Bob

Subject: Feature Request for "fold"
From: BJ Dierkes <[email-masked]>
To: [email-masked]
Date: Fri, 14 May 2010 20:55:28 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello all,

Per the coreutils site I was referred to submit feature requests here on list.  I am trying to use the 'fold' utility to make prettier output from 'git-log'.  The use is irrelevant, but that is my example:

$ git --no-pager log --oneline | fold -s

The output looks something like:

aa271ba Some commit summary
ba231ac Another commit summary but this time the line is too long and goes 
beyond 80 characters
aa271ba Some other commit summary

As you can see, fold chops the second commit entry into two lines, as it went over 80 characters.  What I think would be really useful is the ability to pass a '--indent' option to fold that would allow this:

$ git --no-pager log --oneline | fold -s --indent 8

aa271ba Some commit summary
ba231ac Another commit summary but this time the line is too long and goes 
        beyond 80 characters
aa271ba Some other commit summary

As you can see, this would allow me to generate output that fits better, and looks better when a line gets folded (because i'm using the git commit id in this example as more or less a column).

Thanks.d

---
derks