Subject: bug#70418: ls bug

From: Pádraig Brady <[email-masked]>
Date: Wed, 17 Apr 2024 11:19:29 +0100

On 16/04/2024 23:17, Paul Eggert wrote:
> On 4/16/24 14:30, Toby Kelsey wrote:
>> The man page doesn't explain this format conflict, while the info page
>> (info '(coreutils) ls invocation' or 'info ls') claims '-f' implies '-1'
>> which is also incorrect: 'ls -1f' gives different output to to 'ls -f'.
> 
> Yes, this area of GNU 'ls' a mess. Option order should not matter here.
> 
> Option order didn't matter in 7th Edition Unix, where -f overrode -l
> regardless of whether -f came before or after -l. And option order
> doesn't matter in FreeBSD, where -f and -l are orthogonal. GNU ls is an
> odd hybrid of 7th Edition and FreeBSD and messes this up.
> 
> Rather than document the hybrid mess, let's bite the bullet and fix it.
> FreeBSD behavior makes more sense, so let's do that. Proposed patch
> attached.

+1

Related to this is the recent adjustment of usage() for -f:
https://bugs.gnu.org/67765

Patch looks good, and conforms to POSIX.

thanks!
Pádraig