bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH]: ls: add --user-format option for user defined format


From: Ondřej Vašík
Subject: Re: [PATCH]: ls: add --user-format option for user defined format
Date: Tue, 04 Nov 2008 15:14:30 +0100

Pádraig Brady wrote:
> Thanks for doing that.
> However I thought that item had been removed from the TODO:
> http://lists.gnu.org/archive/html/bug-coreutils/2008-02/msg00115.html
> This is a large patch to do essentially what `find -printf` already does.

Sorry, haven't seen that thread before.

I guess there are some things which you can't do with find -printf and
which you can do with that --user-format ls extension.
I would say there are few reasons why to use ls --user-format instead of
find -printf.

1) It has scalable column width (even possible to reduce width)
2) It has some options unavailable in findutils e.g. for SELinux
   context handling and filemode splitting/handling.
3) It is based on the informations you have completed by ls - so it 
   could be considered more reliable, e.g. it could have EXACTLY 
   the same output as ls -l otherwise have.
4) Is more frequent to use ls than find -printf for listing files, you
   could get colored filenames output with column. 

I agree that the patch is quite large, anyway what I have heard from the
guys around me, it would be useful to have that thing in ls. I tried to
not impact the rest of the ls code, so the changes to the main ls code
are pretty minimal (only some counting (and even that only for
user_format selected) and factorization of one function in
print_long_format).

Please consider those things before throwing that patch away.

Greetings,
         Ondřej

Attachment: signature.asc
Description: Toto je digitálně podepsaná část zprávy


reply via email to

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