[hackers] [sbase] head: Fix usage and manpage || sin

From: <git_AT_suckless.org>
Date: Tue, 24 Mar 2015 23:54:09 +0100 (CET)

commit 68ccf5c0eba0fbcf082d0565e0e65cad114cad3f
Author: sin <sin_AT_2f30.org>
Date: Thu Mar 5 08:10:00 2015 +0000

    head: Fix usage and manpage
    
    -N is not a flag but rather a number specification. Be consistent
    and use -num to be consistent with -n num. num is properly highlighted
    now as well.

diff --git a/head.1 b/head.1
index 179e7ed..ae61791 100644
--- a/head.1
+++ b/head.1
_AT_@ -1,4 +1,4 @@
-.Dd January 25, 2015
+.Dd March 5, 2015
 .Dt HEAD 1
 .Os sbase
 .Sh NAME
_AT_@ -6,15 +6,12 @@
 .Nd display initial lines of files
 .Sh SYNOPSIS
 .Nm
-.Op Fl n Ar num
-.Op Fl N
+.Op Fl n Ar num | Fl Ns Ar num
 .Op Ar file ...
 .Sh DESCRIPTION
 .Nm
 writes
 .Ar num
-|
-.Sy N
 lines of each
 .Ar file
 to stdout.
_AT_@ -25,7 +22,7 @@ is given
 reads from stdin.
 .Sh OPTIONS
 .Bl -tag -width Ds
-.It Fl n Ar num | Fl N
+.It Fl n Ar num | Fl Ns Ar num
 Display initial
 .Ar num
 |
_AT_@ -41,6 +38,6 @@ utility is compliant with the
 .St -p1003.1-2008
 specification.
 .Pp
-The
-.Op Fl N
-flag is an extension to that specification.
+The obsolete
+.Op Fl Ns num
+syntax is an extension to that specification.
diff --git a/head.c b/head.c
index 0b17647..89493fd 100644
--- a/head.c
+++ b/head.c
_AT_@ -24,7 +24,7 @@ head(FILE *fp, const char *fname, size_t n)
 static void
 usage(void)
 {
- eprintf("usage: %s [-n num] [-N] [file ...]\n", argv0);
+ eprintf("usage: %s [-num | -n num] [file ...]\n", argv0);
 }
 
 int
Received on Tue Mar 24 2015 - 23:54:09 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 25 2015 - 00:11:18 CET