[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Jim Meyering
Subject: Re: [RFC]: --format=FORMAT option for ls
Date: Tue, 12 Feb 2008 15:09:41 +0100

Steven Schubiger <address@hidden> wrote:

> Jim Meyering <address@hidden> 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. Concerning the feasibility of sharing parts,
> I don't know offhand (it doesn't look easy though). Albeit I searched
> through the coreutils mailing list archive and found some according
> threads regarding extending ls, I'm not exactly sure what format
> functionality is needed (unless we want a working find -printf
> resembling behavior).

If you're going to implement it, then you should propose what
you think is "right".  IMHO, that would include most if not all
of what find's printf predicate does.  Then there'd have to be
a few new format specifiers so that in the end we can say that by
default, ls acts as if it had been given the --format=... option.

Of course, implementing such a feature properly will not be quick or easy.
If it were so easy, it would have been done long ago.  Don't underestimate
the value of reusing find's code.  Not only do you get stable and
well-tested code, but you get the well-written documentation that goes
with it.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]