Re: [RFC]: --format=FORMAT option for ls

2008-02-12 Thread Bauke Jan Douma
Jim Meyering wrote on 12-02-08 15:50: Pádraig Brady [EMAIL PROTECTED] wrote: I can't think of any reason I would use `ls --format` over `find -printf` Ha! Good point. Nor can I. I'll remove the TODO item. Actually, from the perspective of modularity that is (justifiably) hammered on so

Re: [RFC]: --format=FORMAT option for ls

2008-02-12 Thread James Youngman
On Feb 12, 2008 1:22 PM, Jim Meyering [EMAIL PROTECTED] wrote: Steven Schubiger [EMAIL PROTECTED] wrote: I hacked up a prototype of ls with the possibility of specifying a format string that currently solely defines the order of items. Thanks for working on this. However, before you invest

Re: [RFC]: --format=FORMAT option for ls

2008-02-12 Thread Jim Meyering
Pádraig Brady [EMAIL PROTECTED] wrote: I can't think of any reason I would use `ls --format` over `find -printf` Ha! Good point. Nor can I. I'll remove the TODO item. ___ Bug-coreutils mailing list Bug-coreutils@gnu.org

Re: [RFC]: --format=FORMAT option for ls

2008-02-12 Thread Jim Meyering
Steven Schubiger [EMAIL PROTECTED] wrote: Jim Meyering [EMAIL PROTECTED] wrote: However, before you invest more time in it, please look at how GNU find handles its -printf predicate and see if it is feasible to share parts of that code. As far as I can tell, most of the logic boils down to

Re: [RFC]: --format=FORMAT option for ls

2008-02-12 Thread Steven Schubiger
Jim Meyering [EMAIL PROTECTED] wrote: However, before you invest more time in it, please look at how GNU find handles its -printf predicate and see if it is feasible to share parts of that code. As far as I can tell, most of the logic boils down to insert_fprintf() in findutils' parser.c.

Re: [RFC]: --format=FORMAT option for ls

2008-02-12 Thread James Youngman
On Feb 12, 2008 2:59 PM, James Youngman [EMAIL PROTECTED] wrote: On the other hand, refactoring the code would probably only be worthwhile if the result would not be reused. Obviously the not there should be removed. James. ___ Bug-coreutils

Re: [RFC]: --format=FORMAT option for ls

2008-02-12 Thread Jim Meyering
Steven Schubiger [EMAIL PROTECTED] wrote: I hacked up a prototype of ls with the possibility of specifying a format string that currently solely defines the order of items. Thanks for working on this. However, before you invest more time in it, please look at how GNU find handles its -printf

[RFC]: --format=FORMAT option for ls

2008-02-12 Thread Steven Schubiger
I hacked up a prototype of ls with the possibility of specifying a format string that currently solely defines the order of items. I had to change quite a bit of the underlying code to make it work, as in, moving most of the routines called by print_long_format() to functions, that are both used