#
6ba2f08c |
| 21-Jan-2025 |
Piotr Pawel Stefaniak <pstef@FreeBSD.org> |
ls: --group-directories requires stat information
Fixes: 8b92977857f8
|
#
8b929778 |
| 06-Jan-2025 |
Piotr Pawel Stefaniak <pstef@FreeBSD.org> |
ls: implement --group-directories-first for compatibility with GNU ls
Also implement --group-directories which takes a parameter. "first" is equivalent to --group-directories-first, "last" gives rev
ls: implement --group-directories-first for compatibility with GNU ls
Also implement --group-directories which takes a parameter. "first" is equivalent to --group-directories-first, "last" gives reversed sorting.
Changes in sorting between elements of the same type (files, directories) are not intended.
Differential Revision: https://reviews.freebsd.org/D48347
show more ...
|
#
e6c9c463 |
| 14-Jan-2025 |
Mark Johnston <markj@FreeBSD.org> |
ls: Release resources before returning from traverse()
PR: 278476 MFC after: 2 weeks Reported by: valgrind
|
Revision tags: release/14.2.0, release/13.4.0 |
|
#
647d4a8c |
| 24-Jul-2024 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
ls: Make -, apply to -s as well as -l.
While here, remove a bogus comment about a gcc bug. The bug was in ls, which used an incorrect format string, and in libc, which accepted it.
MFC after: 1 we
ls: Make -, apply to -s as well as -l.
While here, remove a bogus comment about a gcc bug. The bug was in ls, which used an incorrect format string, and in libc, which accepted it.
MFC after: 1 week Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D46067
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
ef75877f |
| 19-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
ls: Fix -v and associated test
The cleanup of d854370fa86b7 had a cut and paste error (so f_verssort was set to 1 and then to 0 rather thame f_timesort being set to 0).
Fixes: d854370fa86b7 Sponsor
ls: Fix -v and associated test
The cleanup of d854370fa86b7 had a cut and paste error (so f_verssort was set to 1 and then to 0 rather thame f_timesort being set to 0).
Fixes: d854370fa86b7 Sponsored by: Netflix
show more ...
|
#
d854370f |
| 02-Feb-2024 |
Alexander Ziaee <concussious@runbox.com> |
ls: versort incompatible w/ timesort and sizesort
ls.1: versort incompatible w/ timesort and sizesort
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/825
|
#
0b8224d1 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals.
Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require).
Sponsored by: Netflix
show more ...
|
#
90aea514 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl s
bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
3bfbb521 |
| 18-Jul-2023 |
Minsoo Choo <minsoochoo0122@proton.me> |
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
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
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
e2662256 |
| 23-Oct-2022 |
Aymeric Wibo <obiwac@gmail.com> |
ls(1): add a -v flag to sort naturally
Add a -v flag for ls which sorts entries following a natural ordering using strverscmp(3) (e.g. "bloem1 bloem9 bloem10" as opposed to "bloem1 bloem10 bloem9").
ls(1): add a -v flag to sort naturally
Add a -v flag for ls which sorts entries following a natural ordering using strverscmp(3) (e.g. "bloem1 bloem9 bloem10" as opposed to "bloem1 bloem10 bloem9").
Update the manual page and add a test case.
Reviewed by: pauamma, bcr Tested by: pstef Differential Revision: https://reviews.freebsd.org/D36407
show more ...
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
97c31821 |
| 19-Sep-2021 |
Cameron Katri <me@cameronkatri.com> |
ls(1): Allow LSCOLORS to specify an underline
Allows capitalizing the background color character to enable an underline instead of bold, capitalizing the foreground color char will still do bold.
D
ls(1): Allow LSCOLORS to specify an underline
Allows capitalizing the background color character to enable an underline instead of bold, capitalizing the foreground color char will still do bold.
Differential Revision: https://reviews.freebsd.org/D30547
show more ...
|
#
ced2dcad |
| 18-Aug-2021 |
Piotr Pawel Stefaniak <pstef@FreeBSD.org> |
ls: prevent no-color build from complaining when COLORTERM is non-empty
As 257886 reports, if ls(1) is built with WITHOUT_LS_COLORS="YES", it issues a warning whenever COLORTERM is non-empty. The wa
ls: prevent no-color build from complaining when COLORTERM is non-empty
As 257886 reports, if ls(1) is built with WITHOUT_LS_COLORS="YES", it issues a warning whenever COLORTERM is non-empty. The warning is not useful, so I thought to remove it, but as Ed pointed out, we may want to have a way to determine whether a particular copy of ls has been compiled with color support or not.
Therefore move the warnx() call to the getopt loop in a WITHOUT_LS_COLORS build to fire when the user asks for colored output.
PR: 257886 Reported by: Marko Turk Reviewed by: kevans
show more ...
|
Revision tags: release/13.0.0 |
|
#
3fee777e |
| 26-Dec-2020 |
Stefan Eßer <se@FreeBSD.org> |
Simplify LS_COLWIDTHS processing
The previous version normalized the width list (replaced empty fields with "0") just to be able to use sscanf() on the string.
It is much simpler to just parse the
Simplify LS_COLWIDTHS processing
The previous version normalized the width list (replaced empty fields with "0") just to be able to use sscanf() on the string.
It is much simpler to just parse the string as-is.
The clearing of f_notabs is preserved for the case that less than 9 width values have been defined, but I do not understand the rationale for this particular condition. E.g., LS_COLWIDTHS="::::::::" will be counted as 9 defined fields (may clear f_notabs) but is no different fron LS_COLWIDTHS="" with regard to the field width (and that does not clear f_notabs, since there are less than 9 fields).
show more ...
|
#
2dfa4b66 |
| 09-Dec-2020 |
Bryan Drewery <bdrewery@FreeBSD.org> |
fts_read: Handle error from a NULL return better.
This is addressing cases such as fts_read(3) encountering an [EIO] from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be seen as a su
fts_read: Handle error from a NULL return better.
This is addressing cases such as fts_read(3) encountering an [EIO] from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be seen as a successful traversal in some of these cases while silently discarding expected work.
As noted in r264201, fts_read() does not set errno to 0 on a successful EOF so it needs to be set before calling it. Otherwise we might see a random error from one of the iterations.
gzip is ignoring most errors and could be improved separately.
Reviewed by: vangyzen Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D27184
show more ...
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
151a7e11 |
| 21-May-2020 |
Kyle Evans <kevans@FreeBSD.org> |
ls: fix WITHOUT_LS_COLORS build
*sigh* references to colorflags should be gated by COLORLS.
Pointy hat to: kevans Reported by: jenkins (rescue build) X-MFC-With: r361318
|
#
a408dc20 |
| 21-May-2020 |
Kyle Evans <kevans@FreeBSD.org> |
ls(1): actually restore proper behavior
Highlights: - CLICOLOR in the environment should imply --color=auto to maintain compatibility with historical behavior - -G should set CLICOLOR and imply --
ls(1): actually restore proper behavior
Highlights: - CLICOLOR in the environment should imply --color=auto to maintain compatibility with historical behavior - -G should set CLICOLOR and imply --color=auto
The manpage has been updated to draw the connection between -G and --color; the former is in-fact a sort of compromise between --color=always and --color=auto, where we'll output color regardless of the environment lacking CLICOLOR/COLORTERM assuming stdout is a tty.
X-MFC-With: r361318
show more ...
|
#
c0f34ded |
| 21-May-2020 |
Kyle Evans <kevans@FreeBSD.org> |
ls: fix a --color regression from r337956
The regression is in-fact that I flipped the default from never to auto. The incorrect impression was based on an alias that I failed to notice, installed b
ls: fix a --color regression from r337956
The regression is in-fact that I flipped the default from never to auto. The incorrect impression was based on an alias that I failed to notice, installed by the Linux distribution that I used for testing compatibility here. Users that want the old default should be doing so with a shell alias as is done elsewhere, rather than making this decision in ls(1).
Many thanks to rgrimes for pointing out the alias that I clearly overlooked that resulted in this; if you despised colors in your terminal from this, consider buying him a beer at the next venue that you see him at.
MFC after: 1 week Relnotes: yes
show more ...
|
#
530d2d67 |
| 05-May-2020 |
Conrad Meyer <cem@FreeBSD.org> |
ls(1): Fix trivial SEGV due to NULL deref in OOM path
Reported by: Anton Rang <rang AT acm.org> Sponsored by: Dell EMC Isilon
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
7847e041 |
| 24-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338026 through r338297, and resolve conflicts.
|
#
517d0a90 |
| 18-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
ls(1): Gate the do_color_* definitions behind COLORLS
Pointy hat to: me
|
#
041e6eb1 |
| 18-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
ls(1): Support other aliases for --color arguments used by GNU ls(1)
These aliases are supported and documented in the man page. For now, they will not be mentioned in the error when an invalid argu
ls(1): Support other aliases for --color arguments used by GNU ls(1)
These aliases are supported and documented in the man page. For now, they will not be mentioned in the error when an invalid argument is encountered, instead keeping that list to the shorter 'preferred' names of each argument.
Reported by: rgrimes
show more ...
|
#
3611ec60 |
| 18-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r337646 through r338014.
|
#
e10ba800 |
| 17-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
ls(1): Add --color=when
--color may be set to one of: 'auto', 'always', and 'never'.
'auto' is the default behavior- output colors only if -G or COLORTERM are set, and only if stdout is a tty.
'al
ls(1): Add --color=when
--color may be set to one of: 'auto', 'always', and 'never'.
'auto' is the default behavior- output colors only if -G or COLORTERM are set, and only if stdout is a tty.
'always' is a new behavior- output colors always. termcap(5) will be consulted unless TERM is unset or not a recognized terminal, in which case ls(1) will fall back to explicitly outputting ANSI escape sequences.
'never' to turn off any environment variable and -G usage.
Reviewed by: cem, 0mp (both modulo last-minute manpage changes Differential Revision: https://reviews.freebsd.org/D16741
show more ...
|
#
7db2f1fe |
| 16-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
ls(1): Fix color env var checking
CLICOLOR will behavior as always- if present at all in the environment, allow colors.
COLORTERM, recently enforced, will have to be both present and not empty.
Su
ls(1): Fix color env var checking
CLICOLOR will behavior as always- if present at all in the environment, allow colors.
COLORTERM, recently enforced, will have to be both present and not empty.
Submitted by: imp
show more ...
|