mirror of
https://github.com/coreutils/coreutils.git
synced 2024-11-23 09:56:42 +08:00
doc: ls: fix regression in -f description
The description of -f regressed in coreutils 9.0 * doc/coreutils.texi (ls invocation): Detail which options are enabled/disabled with -f. * src/ls.c (usage): Likewise. (decode_switches): Update comments. Fixes https://bugs.gnu.org/67765
This commit is contained in:
parent
49c8dab5b2
commit
4de72b7d9f
@ -8135,10 +8135,10 @@ sort according to the ctime. @xref{File timestamps}.
|
||||
@cindex unsorted directory listing
|
||||
@cindex directory order, listing by
|
||||
Produce an unsorted directory listing.
|
||||
This is equivalent to the combination of @option{--all} (@option{-a}),
|
||||
@option{--sort=none} (@option{-U}), @option{-1},
|
||||
@option{--color=none}, and @option{--hyperlink=none},
|
||||
while also disabling any previous use of @option{--size} (@option{-s}).
|
||||
This is like @option{--sort=none} (@option{-U}),
|
||||
but also enable @option{--all} (@option{-a}),
|
||||
while also disabling any previous use of @option{-l}, @option{--color}
|
||||
@option{--size}, or @option{--hyperlink}.
|
||||
|
||||
@item -r
|
||||
@itemx --reverse
|
||||
|
16
src/ls.c
16
src/ls.c
@ -1950,15 +1950,13 @@ decode_switches (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
/* Same as -a -U -1 --color=none --hyperlink=none,
|
||||
while disabling -s. */
|
||||
ignore_mode = IGNORE_MINIMAL;
|
||||
sort_opt = sort_none;
|
||||
ignore_mode = IGNORE_MINIMAL; /* enable -a */
|
||||
sort_opt = sort_none; /* enable -U */
|
||||
if (format_opt == long_format)
|
||||
format_opt = -1;
|
||||
print_with_color = false;
|
||||
print_hyperlink = false;
|
||||
print_block_size = false;
|
||||
format_opt = -1; /* disable -l */
|
||||
print_with_color = false; /* disable --color */
|
||||
print_hyperlink = false; /* disable --hyperlink */
|
||||
print_block_size = false; /* disable -s */
|
||||
break;
|
||||
|
||||
case FILE_TYPE_INDICATOR_OPTION: /* --file-type */
|
||||
@ -5470,7 +5468,7 @@ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\
|
||||
-D, --dired generate output designed for Emacs' dired mode\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
-f list all entries in directory order\n\
|
||||
-f do not sort, enable -aU, disable -ls --color\n\
|
||||
-F, --classify[=WHEN] append indicator (one of */=>@|) to entries WHEN\n\
|
||||
--file-type likewise, except do not append '*'\n\
|
||||
"), stdout);
|
||||
|
Loading…
Reference in New Issue
Block a user