GNU bug report logs -
#6195
Feature Request for "fold"
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 7 Jun 2010 17:32:41 -0600
with message-id <20100607233241.GF585 <at> dementia.proulx.com>
and subject line Re: bug#6195: Feature Request for "fold"
has caused the GNU bug report #6195,
regarding Feature Request for "fold"
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
6195: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6195
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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
[Message part 3 (message/rfc822, inline)]
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
This bug report was last modified 12 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.