diff options
author | Igor Sobrado <sobrado@cvs.openbsd.org> | 2014-03-31 20:54:38 +0000 |
---|---|---|
committer | Igor Sobrado <sobrado@cvs.openbsd.org> | 2014-03-31 20:54:38 +0000 |
commit | 9b5b81832fde49f6d503cfa045db2232ee60181d (patch) | |
tree | b0049d738cb8ee23e078ee2b5f68428e70e147f1 /bin/ls | |
parent | 72c9714ab09dc9052b686f0defa49cc3a4cae679 (diff) |
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@
ok millert@, schwarze@
Diffstat (limited to 'bin/ls')
-rw-r--r-- | bin/ls/ls.1 | 8 | ||||
-rw-r--r-- | bin/ls/ls.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/bin/ls/ls.1 b/bin/ls/ls.1 index 4a500d8420b..73e3a5575b0 100644 --- a/bin/ls/ls.1 +++ b/bin/ls/ls.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ls.1,v 1.69 2014/03/31 07:06:20 jmc Exp $ +.\" $OpenBSD: ls.1,v 1.70 2014/03/31 20:54:37 sobrado Exp $ .\" $NetBSD: ls.1,v 1.14 1995/12/05 02:44:01 jtc Exp $ .\" .\" Copyright (c) 1980, 1990, 1991, 1993, 1994 @@ -121,6 +121,8 @@ and a vertical bar after each that is a FIFO. .It Fl f Output is not sorted. +This option turns on +.Fl a . .It Fl g List in long format as in .Fl l , @@ -476,10 +478,8 @@ utility is compliant with the .St -p1003.1-2008 specification, except behaviour for the -.Fl f -and .Fl o -flags differs. +flag differs. .Pp The flags .Op Fl hT , diff --git a/bin/ls/ls.c b/bin/ls/ls.c index b82d4952bcb..075677bb23c 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ls.c,v 1.38 2013/05/30 16:34:32 guenther Exp $ */ +/* $OpenBSD: ls.c,v 1.39 2014/03/31 20:54:37 sobrado Exp $ */ /* $NetBSD: ls.c,v 1.18 1996/07/09 09:16:29 mycroft Exp $ */ /* @@ -186,6 +186,9 @@ ls_main(int argc, char *argv[]) case 'R': f_recursive = 1; break; + case 'f': + f_nosort = 1; + /* FALLTHROUGH */ case 'a': fts_options |= FTS_SEEDOT; /* FALLTHROUGH */ @@ -197,9 +200,6 @@ ls_main(int argc, char *argv[]) f_listdir = 1; f_recursive = 0; break; - case 'f': - f_nosort = 1; - break; case 'h': f_humanval = 1; break; |