From unknown Thu Aug 14 21:48:56 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6195 <6195@debbugs.gnu.org> To: bug#6195 <6195@debbugs.gnu.org> Subject: Status: Feature Request for "fold" Reply-To: bug#6195 <6195@debbugs.gnu.org> Date: Fri, 15 Aug 2025 04:48:56 +0000 retitle 6195 Feature Request for "fold" reassign 6195 coreutils submitter 6195 BJ Dierkes severity 6195 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 22:06:56 2010 Received: (at submit) by debbugs.gnu.org; 15 May 2010 02:06:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OD6mF-0002pI-R7 for submit@debbugs.gnu.org; Fri, 14 May 2010 22:06:56 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OD6bG-0002kn-B4 for submit@debbugs.gnu.org; Fri, 14 May 2010 21:55:35 -0400 Received: from lists.gnu.org ([199.232.76.165]:41143) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OD6bF-0006Xr-1a for submit@debbugs.gnu.org; Fri, 14 May 2010 21:55:33 -0400 Received: from [140.186.70.92] (port=54885 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OD6bD-0001DV-PU for bug-coreutils@gnu.org; Fri, 14 May 2010 21:55:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OD6bC-00016S-5w for bug-coreutils@gnu.org; Fri, 14 May 2010 21:55:31 -0400 Received: from smtp203.iad.emailsrvr.com ([207.97.245.203]:54712) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OD6bC-00016G-35 for bug-coreutils@gnu.org; Fri, 14 May 2010 21:55:30 -0400 Received: from relay20.relay.iad.mlsrvr.com (localhost [127.0.0.1]) by relay20.relay.iad.mlsrvr.com (SMTP Server) with ESMTP id 0A47A1B401A for ; Fri, 14 May 2010 21:55:29 -0400 (EDT) Received: by relay20.relay.iad.mlsrvr.com (Authenticated sender: wdierkes-AT-5dollarwhitebox.org) with ESMTPSA id E50671B400E for ; Fri, 14 May 2010 21:55:28 -0400 (EDT) From: BJ Dierkes Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Feature Request for "fold" Date: Fri, 14 May 2010 20:55:28 -0500 Message-Id: <457CC6B9-8C2F-4840-B890-30B528887D4B@5dollarwhitebox.org> To: bug-coreutils@gnu.org Mime-Version: 1.0 (Apple Message framework v1078) X-Mailer: Apple Mail (2.1078) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 14 May 2010 22:06:54 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) 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=20 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=20 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 From debbugs-submit-bounces@debbugs.gnu.org Sat May 15 09:30:14 2010 Received: (at 6195) by debbugs.gnu.org; 15 May 2010 13:30:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODHRW-0007rm-4Y for submit@debbugs.gnu.org; Sat, 15 May 2010 09:30:14 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1ODHRU-0007rf-44 for 6195@debbugs.gnu.org; Sat, 15 May 2010 09:30:12 -0400 Received: (qmail 45478 invoked from network); 15 May 2010 13:30:11 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 15 May 2010 13:30:11 -0000 Message-ID: <4BEEA16E.80700@draigBrady.com> Date: Sat, 15 May 2010 14:28:14 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: BJ Dierkes Subject: Re: bug#6195: Feature Request for "fold" References: <457CC6B9-8C2F-4840-B890-30B528887D4B@5dollarwhitebox.org> In-Reply-To: <457CC6B9-8C2F-4840-B890-30B528887D4B@5dollarwhitebox.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6195 Cc: 6195@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) 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. From debbugs-submit-bounces@debbugs.gnu.org Sun May 16 15:00:44 2010 Received: (at 6195) by debbugs.gnu.org; 16 May 2010 19:00:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODj4u-0004HV-GN for submit@debbugs.gnu.org; Sun, 16 May 2010 15:00:44 -0400 Received: from smtp119.iad.emailsrvr.com ([207.97.245.119]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODj4s-0004HQ-V1 for 6195@debbugs.gnu.org; Sun, 16 May 2010 15:00:43 -0400 Received: from relay31.relay.iad.mlsrvr.com (localhost [127.0.0.1]) by relay31.relay.iad.mlsrvr.com (SMTP Server) with ESMTP id 935F01B4D51; Sun, 16 May 2010 15:00:38 -0400 (EDT) Received: by relay31.relay.iad.mlsrvr.com (Authenticated sender: wdierkes-AT-5dollarwhitebox.org) with ESMTPSA id 644F31B4221; Sun, 16 May 2010 15:00:38 -0400 (EDT) Subject: Re: bug#6195: Feature Request for "fold" Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=iso-8859-1 From: BJ Dierkes In-Reply-To: <4BEEA16E.80700@draigBrady.com> Date: Sun, 16 May 2010 14:00:37 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <457CC6B9-8C2F-4840-B890-30B528887D4B@5dollarwhitebox.org> <4BEEA16E.80700@draigBrady.com> To: =?iso-8859-1?Q?P=E1draig_Brady?= X-Mailer: Apple Mail (2.1078) X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 6195 Cc: 6195@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) On May 15, 2010, at 8:28 AM, P=E1draig Brady wrote: > On 15/05/10 02:55, BJ Dierkes wrote: >> Hello all, >>=20 >> I am trying to use the 'fold' utility to make prettier output from = 'git-log'. >>=20 >> $ git --no-pager log --oneline | fold -s >=20 > `fmt` seems to nearly do what you want, > and with a little sed you can line up correctly: >=20 > fmt -t | sed 's/^ / /' >=20 > 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. >=20 > cheers, > P=E1draig. Thank you for the quick reply. Your response makes complete sense. --- derks From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 07 19:32:47 2010 Received: (at 6195-done) by debbugs.gnu.org; 7 Jun 2010 23:32:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLloF-0005up-5b for submit@debbugs.gnu.org; Mon, 07 Jun 2010 19:32:47 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLloD-0005uj-SQ for 6195-done@debbugs.gnu.org; Mon, 07 Jun 2010 19:32:46 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.230.115]) by joseki.proulx.com (Postfix) with ESMTP id E0F8221362; Mon, 7 Jun 2010 17:32:41 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id D899F3CD899; Mon, 7 Jun 2010 17:32:41 -0600 (MDT) Date: Mon, 7 Jun 2010 17:32:41 -0600 From: Bob Proulx To: BJ Dierkes Subject: Re: bug#6195: Feature Request for "fold" Message-ID: <20100607233241.GF585@dementia.proulx.com> References: <457CC6B9-8C2F-4840-B890-30B528887D4B@5dollarwhitebox.org> <4BEEA16E.80700@draigBrady.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 6195-done Cc: 6195-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) BJ Dierkes wrote: > P=E1draig Brady wrote: > >> $ git --no-pager log --oneline | fold -s > >=20 > > `fmt` seems to nearly do what you want, > > and with a little sed you can line up correctly: > >=20 > > fmt -t | sed 's/^ / /' > >=20 > > 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. >=20 > 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 From unknown Thu Aug 14 21:48:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 06 Jul 2010 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 20 13:07:12 2013 Received: (at control) by debbugs.gnu.org; 20 Apr 2013 17:07:13 +0000 Received: from localhost ([127.0.0.1]:33745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UTbFn-000608-9O for submit@debbugs.gnu.org; Sat, 20 Apr 2013 13:07:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2242) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UTbFe-0005zm-RV; Sat, 20 Apr 2013 13:07:05 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3KH2Lb0013653 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 20 Apr 2013 13:02:21 -0400 Received: from [10.36.116.35] (ovpn-116-35.ams2.redhat.com [10.36.116.35]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3KH2Irj022739 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 20 Apr 2013 13:02:19 -0400 Message-ID: <5172CA19.8080402@draigBrady.com> Date: Sat, 20 Apr 2013 18:02:17 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Jazzoslav Jammovitch Subject: Re: Feature request: fold -p STR ... Prefix each folded line with STR References: In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r3KH2Lb0013653 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control Cc: 6195@debbugs.gnu.org, coreutils@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) unarchive 6195 stop On 04/20/2013 11:50 AM, Jazzoslav Jammovitch wrote: > Greetings, Supaninjas! >=20 > I wish to make a request for a new feature to the fold program. Often, = I find > myself folding lines that comprise some kind of list such as: >=20 > =3D=3D A =3D=3D > 1. Hola Mundo! > 2. Cows say moo when they feel chatty. > 3. I scream, you scream, we all scream for icecream! -- Roberto >=20 > Folding this at 30 characters yields approximately the following list, = but the > desired effect would be to add three spaces to each broken line in orde= r to > align them with the enumeration index as demonstrated in list C. >=20 > =3D=3D B =3D=3D > 1. Hola Mundo! > 2. Cows say moo when they > feel chatty. > 3. I scream, you scream, we > all scream for icecream! -- > Roberto >=20 > =3D=3D C =3D=3D > 1. Hola Mundo! > 2. Cows say moo when they > feel chatty. > 3. I scream, you scream, we > all scream for icecream! > -- Roberto >=20 > Another somewhat contrived use case would be to fold the output of hist= ory at > 1/3 - 1/2 of the terminal width and pipe the output into column -c 80 t= o make > use of the whole terminal. Like so: >=20 > $ hD -20 > 5900 lol 5908 lssort > 5901 history 5909 history > 5902 sBrc 5910 vim > 5903 vim /home/jaroslav/.bashrc > /home/jaroslav/.bashrc 5911 history > 5904 sBrc 5912 historyPurge 15 > 5905 history 5913 hD > 5906 function historyPurge { 5914 hD -20 > local range=3D`history | 5915 hD -50 > tail 5916 hD -40 > -n ${1:-1} | cut -d' ' 5917 hD -20 > -f 5918 hD -30 > 2`; history | tail -n 15 5919 hD -20 > ; } > 5907 history >=20 > What say you? Is this a useful feature or should I forget it and improv= e my sed > skills instead? Yes, this does have merit, but as responded to the very similar request in http://bugs.gnu.org/6195, fmt and sed might suffice. If not then we can reconsider. thanks! P=E1draig. From unknown Thu Aug 14 21:48:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 19 May 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator