Subject: Feature Request for "fold"

From: BJ Dierkes <[email-masked]>
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