Re: git: 3bfbb521fef5 - main - ls: Improve POSIX compatibility for -g and -n.
- In reply to: John Baldwin : "git: 3bfbb521fef5 - main - ls: Improve POSIX compatibility for -g and -n."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Jul 2023 17:08:34 UTC
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