[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC]: --format=FORMAT option for ls
From: |
James Youngman |
Subject: |
Re: [RFC]: --format=FORMAT option for ls |
Date: |
Tue, 12 Feb 2008 14:59:01 +0000 |
On Feb 12, 2008 1:22 PM, Jim Meyering <address@hidden> wrote:
> Steven Schubiger <address@hidden> 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 predicate and see if it
> is feasible to share parts of that code.
If this functionality is useful to coreutils, I'm happy to refactor
the findutils code so that it's reusable. However, there are a small
number of format directives that don't seem to be usefully sharable.
For example, %d, %P, and %H. The existing find code is also running
out of format specifiers; I've been considering a keyword-oriented
variant like %(hardlinkcount)d for a while. That at least would be a
little more extensible.
On the other hand, refactoring the code would probably only be
worthwhile if the result would not be reused.
James.
Re: [RFC]: --format=FORMAT option for ls,
James Youngman <=