GNU bug report logs - #49716
no -print0 for ls?

Previous Next

Package: coreutils;

Reported by: Vito Caputo <vcaputo <at> pengaru.com>

Date: Sat, 24 Jul 2021 09:45:02 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #57 received at 49716 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: Vito Caputo <vcaputo <at> pengaru.com>, 49716 <at> debbugs.gnu.org
Subject: Re: bug#49716: no -print0 for ls?
Date: Wed, 28 Jul 2021 12:37:14 -0700
[Message part 1 (text/plain, inline)]
On 7/28/21 4:57 AM, Pádraig Brady wrote:
> I see --zero implies --format=single-column, but allows --format=long.
> That's the right default, but also most flexible.

Yes, it's a little tricky here.

For quite some time the ls -1 (digit 1 option) code has disagreed with 
its documentation. The doc said '-1' is equivalent to 
'--format=single-column', but the code makes '-l -1' equivalent to '-l' 
whereas '-l --format=single-column' is equivalent to no option at all.

I see three possible fixes here:

1. Change the doc to match the code, i.e., change the documentation to 
say that -1 is not the same thing as --format=single-column.

2. Change the code so that --format=single-column also has no effect 
after -l, and change the doc to document this.

3. Change the code to match the doc.

(3) would not conform to POSIX, so that's out. (1) is less work for us 
and does not affect existing uses, so I installed the first attached 
patch to implement (1). This first patch also cleans up a bunch of other 
documentation cruft that I noticed in the 'ls' documentation. The second 
patch updates up some old-fashioned terminology I noticed while working 
on the first patch.

You could talk me into (2), I suppose....
[0001-doc-improve-ls-documentation.patch (text/x-patch, attachment)]
[0002-doc-modernize-usage-of-disk-and-core.patch (text/x-patch, attachment)]

This bug report was last modified 3 years and 353 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.