#6195 - Feature Request for "fold" (original) (raw)

GNU bug report logs - #6195

Feature Request for "fold"

Previous Next

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6195 in the body.
You can then email your comments to 6195 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.


Report forwardedto owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6195; Package coreutils. (Sat, 15 May 2010 02:07:01 GMT) Full text and rfc822 format available.


Acknowledgement sentto BJ Dierkes <wdierkes <at> 5dollarwhitebox.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 15 May 2010 02:07:01 GMT) Full text and rfc822 format available.


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

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


Information forwardedto owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6195; Package coreutils. (Sat, 15 May 2010 13:31:02 GMT) Full text and rfc822 format available.


Message #8 received at 6195 debbugs.gnu.org (full text, mbox):

On 15/05/10 02:55, BJ Dierkes wrote:

Hello all,

I am trying to use the 'fold' utility to make prettier output from 'git-log'.

$ 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.

cheers, Pádraig.


Information forwardedto owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6195; Package coreutils. (Sun, 16 May 2010 19:01:02 GMT) Full text and rfc822 format available.


Message #11 received at 6195 debbugs.gnu.org (full text, mbox):

On May 15, 2010, at 8:28 AM, Pádraig Brady wrote:

On 15/05/10 02:55, BJ Dierkes wrote:

Hello all,

I am trying to use the 'fold' utility to make prettier output from 'git-log'.

$ 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.

cheers, Pádraig.

Thank you for the quick reply. Your response makes complete sense.


derks


Reply sentto Bob Proulx <bob <at> proulx.com>:
You have taken responsibility. (Mon, 07 Jun 2010 23:33:02 GMT) Full text and rfc822 format available.


Notification sentto BJ Dierkes <wdierkes <at> 5dollarwhitebox.org>:
bug acknowledged by developer. (Mon, 07 Jun 2010 23:33:02 GMT) Full text and rfc822 format available.


Message #16 received at 6195-done debbugs.gnu.org (full text, mbox):

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


**bug archived.**Request was from Debbugs Internal Request <help-debbugs <at> gnu.org>to internal_control <at> debbugs.gnu.org. (Tue, 06 Jul 2010 11:24:04 GMT) Full text and rfc822 format available.


**bug unarchived.**Request was from Pádraig Brady <P <at> draigBrady.com>to control <at> debbugs.gnu.org. (Sat, 20 Apr 2013 17:08:02 GMT) Full text and rfc822 format available.


**bug archived.**Request was from Debbugs Internal Request <help-debbugs <at> gnu.org>to internal_control <at> debbugs.gnu.org. (Sun, 19 May 2013 11:24:04 GMT) Full text and rfc822 format available.


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


Previous Next


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