GNU bug report logs - #6195
Feature Request for "fold"

Previous Next

Package: coreutils;

Reported by: BJ Dierkes <wdierkes <at> 5dollarwhitebox.org>

Date: Sat, 15 May 2010 02:07:01 UTC

Severity: wishlist

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: BJ Dierkes <wdierkes <at> 5dollarwhitebox.org>
To: bug-coreutils <at> gnu.org
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







This bug report was last modified 12 years and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.