Re: [PATCH] ls: add --files0-from=FILE option

2021-04-26 Thread Carl Edquist via GNU coreutils General Discussion
On Wed, 21 Apr 2021, Carl Edquist wrote: Thanks Pádraig for the thoughtful reply! You bring up some good points, which for the sake of interesting discussion i'd like to follow up on also. (Maybe later this week...) So to follow up - i don't have any action items here, just some details

Re: [PATCH] ls: add --files0-from=FILE option

2021-04-21 Thread Carl Edquist via GNU coreutils General Discussion
On Tue, 20 Apr 2021, p...@draigbrady.com wrote: > One can also implement this functionality with the DSU pattern like: > > nlargest=10 > find . -printf '%s\t%p\0' | > sort -z -k1,1n | tail -z -n"$nlargest" | cut -z -f2 | > xargs -r0 ls -lUd --color=auto -- > > Arguably that's more

Re: [PATCH] ls: add --files0-from=FILE option

2021-04-21 Thread Carl Edquist via GNU coreutils General Discussion
Hi Berny, On Wed, 21 Apr 2021, Bernhard Voelker wrote: shouldn't it use the 'argv-iter' gnulib module (like du.c and wc.c) instead of directly using the underlying ... +#include "readtokens0.h" I considered this, too! :) I think the short answer is that du and wc don't actually need to

Re: [PATCH] ls: add --files0-from=FILE option

2021-04-20 Thread Bernhard Voelker
On 4/20/21 2:57 PM, Pádraig Brady wrote: > On 19/04/2021 18:08, Carl Edquist wrote: > In saying all of the above, I do agree though that for consistency > commands that need to process all arguments with global context, > should have a --files0-from option. > Currently that's du and wc for total

Re: [PATCH] ls: add --files0-from=FILE option

2021-04-20 Thread Pádraig Brady
On 19/04/2021 18:08, Carl Edquist wrote: Greetings Coreutils, I'm submitting for your consideration here a patch to add the standard '--files0-from=FILE' option to ls. (To read NUL-terminated names from FILE rather than using command line arguments.) Motivation for adding this to ls is

[PATCH] ls: add --files0-from=FILE option

2021-04-19 Thread Carl Edquist
urse welcome. Carl -=-=-+-=-=- [1] https://youtu.be/AQvOnDlql5gFrom f47996c749d7f155a10ca0fa8c1976821059ad50 Mon Sep 17 00:00:00 2001 From: Carl Edquist Date: Fri, 10 May 2019 17:05:47 -0500 Subject: [PATCH] ls: add --files0-from=FILE option Useful for things like find [...] -type

Re: [PATCH] ls: add --files0-from=FILE option

2021-04-19 Thread Carl Edquist via GNU coreutils General Discussion
30fb711962bbd432aea4268baf93d7ba17aae4bc Mon Sep 17 00:00:00 2001 From: Carl Edquist Date: Fri, 10 May 2019 17:05:47 -0500 Subject: [PATCH] ls: add --files0-from=FILE option Useful for things like find [...] -type f -print0 | ls -lrSh --files0-from=- where an attempt to do the same with 'find -print0