Skip to content

Commit

Permalink
ls: versort incompatible w/ timesort and sizesort
Browse files Browse the repository at this point in the history
ls.1: versort incompatible w/ timesort and sizesort

Reviewed by: imp
Pull Request: #825

(cherry picked from commit d854370)
  • Loading branch information
concussious authored and gbergling committed Feb 28, 2024
1 parent e6c0ce9 commit ff86c97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions bin/ls/ls.1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
.\"
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
.\"
.Dd July 18, 2023
.Dd January 12, 2024
.Dt LS 1
.Os
.Sh NAME
Expand Down Expand Up @@ -459,9 +459,9 @@ options all override each other; the last one specified determines
the file time used.
.Pp
The
.Fl S
.Fl S , t
and
.Fl t
.Fl v
options override each other; the last one specified determines
the sort order used.
.Pp
Expand Down
12 changes: 8 additions & 4 deletions bin/ls/ls.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,21 @@ main(int argc, char *argv[])
case 'A':
f_listdot = 1;
break;
/* The -t and -S options override each other. */
/* The -S, -t and -v options override each other. */
case 'S':
f_sizesort = 1;
f_timesort = 0;
f_verssort = 0;
break;
case 't':
f_timesort = 1;
f_sizesort = 0;
f_verssort = 0;
break;
case 'v':
f_verssort = 1;
f_sizesort = 0;
f_verssort = 0;
break;
/* Other flags. Please keep alphabetic. */
case ',':
Expand Down Expand Up @@ -446,9 +453,6 @@ main(int argc, char *argv[])
case 's':
f_size = 1;
break;
case 'v':
f_verssort = 1;
break;
case 'w':
f_nonprint = 0;
f_octal = 0;
Expand Down

0 comments on commit ff86c97

Please sign in to comment.