Problem reported by Toby Kelsey <https://bugs.gnu.org/70418>.
* src/ls.c (decode_switches): -f now simply means -a -U.
(usage): Adjust to match.
have exited with a "Function not implemented" error.
[bug introduced in coreutils-8.28]
+** Changes in behavior
+
+ ls's -f option now simply acts like -aU, instead of also ignoring
+ some earlier options. For example 'ls -fl' and 'ls -lf' are now
+ equivalent because -f no longer ignores an earlier -l. The new
+ behavior is more orthogonal and is compatible with FreeBSD.
+
** Improvements
sort operates more efficiently when used on pseudo files with
@opindex -f
@cindex unsorted directory listing
@cindex directory order, listing by
-Produce an unsorted directory listing.
-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}.
+Produce an unsorted listing of all directory entries.
+This is like @option{--all} (@option{-a}) combined
+with @option{--sort=none} (@option{-U}).
@item -r
@itemx --reverse
@opindex --sort
@opindex none@r{, sorting option for @command{ls}}
Do not sort; list the files in whatever order they are
-stored in the directory. (Do not do any of the other unrelated things
-that @option{-f} does.) This can be useful when listing large
+stored in the directory. This can be useful when listing large
directories, where sorting can take some time.
+Unlike @option{-f}, this option does not imply @option{--all}
+(@option{-a}).
+
@item -v
@itemx --sort=version
@opindex -v
case 'f':
ignore_mode = IGNORE_MINIMAL; /* enable -a */
sort_opt = sort_none; /* enable -U */
- if (format_opt == long_format)
- 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 */
-D, --dired generate output designed for Emacs' dired mode\n\
"), stdout);
fputs (_("\
- -f do not sort, enable -aU, disable -ls --color\n\
+ -f same as -a -U\n\
-F, --classify[=WHEN] append indicator (one of */=>@|) to entries WHEN\n\
--file-type likewise, except do not append '*'\n\
"), stdout);