[hackers] [sbase] strings: Default to -a || sin

From: <git_AT_suckless.org>
Date: Tue, 17 Feb 2015 14:50:40 +0100 (CET)

commit b441a1dd8eefda1e5b6426963a851a7f729497ca
Author: sin <sin_AT_2f30.org>
Date: Tue Feb 17 13:39:17 2015 +0000

    strings: Default to -a

diff --git a/README b/README
index a54c936..5203db1 100644
--- a/README
+++ b/README
_AT_@ -67,7 +67,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
    sort no -m, -o, -d, -f, -i
 =* split yes none
 =* sponge non-posix none
- strings no -a, -n, -t
+ strings no -n, -t
 =* sync non-posix none
 =* tail yes none
 =* tar non-posix none
diff --git a/strings.1 b/strings.1
index db646e9..ec534d3 100644
--- a/strings.1
+++ b/strings.1
_AT_@ -6,6 +6,7 @@
 .Nd print the strings of printable characters in files
 .Sh SYNOPSIS
 .Nm
+.Op Fl a
 .Op Ar file ...
 .Sh DESCRIPTION
 .Nm
_AT_@ -15,6 +16,11 @@ long. If no
 are given,
 .Nm
 reads from stdin.
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl a
+Scan files in their entirety. This is the default.
+.El
 .Sh STANDARDS
 .Nm
 mirrors the semantics of Plan9
diff --git a/strings.c b/strings.c
index 9d077a1..59f3363 100644
--- a/strings.c
+++ b/strings.c
_AT_@ -9,7 +9,7 @@ static void dostrings(FILE *fp, const char *fname);
 static void
 usage(void)
 {
- eprintf("usage: %s [file ...]\n", argv0);
+ eprintf("usage: %s [-a] [file ...]\n", argv0);
 }
 
 int
_AT_@ -19,6 +19,8 @@ main(int argc, char *argv[])
         int ret = 0;
 
         ARGBEGIN {
+ case 'a':
+ break;
         default:
                 usage();
         } ARGEND;
Received on Tue Feb 17 2015 - 14:50:40 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 17 2015 - 15:00:14 CET