Thanks for the clarification and patch

On 16/04/2024 at 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.


--

Chris Elvidge



Reply via email to