Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jul 2023 10:08:34 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 3bfbb521fef5 - main - ls: Improve POSIX compatibility for -g and -n.
Message-ID:  <5c74c6a9-32bc-f965-f407-6cd68b550b07@FreeBSD.org>
In-Reply-To: <202307181704.36IH43FZ097908@gitrepo.freebsd.org>
References:  <202307181704.36IH43FZ097908@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/18/23 10:04 AM, John Baldwin wrote:
> The branch main has been updated by jhb:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=3bfbb521fef5764ecabc2bf3fdc76f47258171f8
> 
> commit 3bfbb521fef5764ecabc2bf3fdc76f47258171f8
> Author:     Minsoo Choo <minsoochoo0122@proton.me>
> AuthorDate: 2023-07-18 16:49:59 +0000
> Commit:     John Baldwin <jhb@FreeBSD.org>
> CommitDate: 2023-07-18 17:03:09 +0000
> 
>      ls: Improve POSIX compatibility for -g and -n.
>      
>      - Change -g (ignored for BSD 4.3 compatibility since BSD 4.4)
>        to use POSIX semantics of implying -l but omitting the owner's
>        name.
>      
>      - Change -n to imply -l.
>      
>      The -o option remains unchanged (POSIX defines -o as a complement to
>      -g that implies -l but omits group names whereas BSD defines -o to add
>      file flags to -l).  This compromise is the same used by both NetBSD
>      and OpenBSD.
>      
>      PR:             70813
>      Reviewed by:    jhb, Pau Amma <pauamma@gundo.com>
>      Co-authored-by: John Baldwin <jhb@FreeBSD.org>
>      Differential Revision:  https://reviews.freebsd.org/D34747

FWIW, macOS uses '-O' to display file flags instead of '-o' (which has POSIX
semantics there).  Currently there is no way to get the equivalent of POSIX
-o output from ls, but breaking compatability for -o seems too large (as noted
in discussion in the review) vs this compromise that matches NetBSD and OpenBSD.

-- 
John Baldwin




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5c74c6a9-32bc-f965-f407-6cd68b550b07>