diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2011-03-04 21:03:20 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2011-03-04 21:03:20 +0000 |
commit | f32c6cef51160ef4721d153ed090d42a52faba68 (patch) | |
tree | bc8f9ad76d6a2223f58e07904ee568296ffb7739 /bin/ls/ls.c | |
parent | e2f8e6d5d50c4fd4c3b7be00097da0c7ed49a64f (diff) |
add support for the (POSIX) -H flag
feedback and ok millert@, sobrado@, jmc@
Diffstat (limited to 'bin/ls/ls.c')
-rw-r--r-- | bin/ls/ls.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 7130eae1534..bbdae89ac19 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ls.c,v 1.36 2010/09/12 20:16:29 sobrado Exp $ */ +/* $OpenBSD: ls.c,v 1.37 2011/03/04 21:03:19 okan Exp $ */ /* $NetBSD: ls.c,v 1.18 1996/07/09 09:16:29 mycroft Exp $ */ /* @@ -122,7 +122,7 @@ ls_main(int argc, char *argv[]) f_listdot = 1; fts_options = FTS_PHYSICAL; - while ((ch = getopt(argc, argv, "1ACFLRSTacdfghiklmnopqrstux")) != -1) { + while ((ch = getopt(argc, argv, "1ACFHLRSTacdfghiklmnopqrstux")) != -1) { switch (ch) { /* * The -1, -C and -l, -m, -n and -x options all override each @@ -176,6 +176,9 @@ ls_main(int argc, char *argv[]) case 'F': f_type = 1; break; + case 'H': + fts_options |= FTS_COMFOLLOW; + break; case 'L': fts_options &= ~FTS_PHYSICAL; fts_options |= FTS_LOGICAL; |