--- Begin Message ---
Subject: |
Feature Request for "fold" |
Date: |
Fri, 14 May 2010 20:55:28 -0500 |
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
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#6195: Feature Request for "fold" |
Date: |
Mon, 7 Jun 2010 17:32:41 -0600 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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
--- End Message ---