summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2014-04-03 05:48:28 +0000
committergrog <grog@FreeBSD.org>2014-04-03 05:48:28 +0000
commitf7930141c58787bafdc2df7cdbb40bb005a85502 (patch)
tree3021f163faaa3a74bad759f41f9677dfeaf3dd0e /bin
parent51495517faae99336e9be920af65a982f629b293 (diff)
downloadFreeBSD-src-f7930141c58787bafdc2df7cdbb40bb005a85502.zip
FreeBSD-src-f7930141c58787bafdc2df7cdbb40bb005a85502.tar.gz
Make -f set -a, as required by the standard.
From the original OpenBSD commit message: restore the traditional behavior of -f implying -a; apparently Keith Bostic forgot to restore it when the -f flag was put back on 2nd of September 1989, after being removed on 16th of August as a consequence of issues getting it working over NFS, so deviation from traditional UNIX behavior in all BSDs looks like an historical accident; as a side effect, this change accommodates behavior of this option to IEEE Std 1003.1-2008 (``POSIX.1''). joint work with jmc@ (who found the inaccuracy in our implementation), schwarze@ (who provided a detailed tracking of historical facts) and millert@ Submitted by: Igor Sobrado Discussed with: mckusick Obtained from: OpenBSD project MFC after: 2 weeks
Diffstat (limited to 'bin')
-rw-r--r--bin/ls/ls.12
-rw-r--r--bin/ls/ls.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/bin/ls/ls.1 b/bin/ls/ls.1
index 8b7672b..d9e006b 100644
--- a/bin/ls/ls.1
+++ b/bin/ls/ls.1
@@ -194,6 +194,8 @@ Use time when file status was last changed for sorting or printing.
Directories are listed as plain files (not searched recursively).
.It Fl f
Output is not sorted.
+This option turns on
+.Fl a .
.It Fl g
This option is deprecated and is only available for compatibility
with
diff --git a/bin/ls/ls.c b/bin/ls/ls.c
index be09035..a46f358 100644
--- a/bin/ls/ls.c
+++ b/bin/ls/ls.c
@@ -226,6 +226,9 @@ main(int argc, char *argv[])
f_accesstime = 0;
f_statustime = 0;
break;
+ case 'f':
+ f_nosort = 1;
+ /* FALLTHROUGH */
case 'a':
fts_options |= FTS_SEEDOT;
/* FALLTHROUGH */
@@ -300,9 +303,6 @@ main(int argc, char *argv[])
f_listdir = 1;
f_recursive = 0;
break;
- case 'f':
- f_nosort = 1;
- break;
case 'g': /* Compatibility with 4.3BSD. */
break;
case 'h':
OpenPOWER on IntegriCloud