]> granicus.if.org Git - procps-ng/commitdiff
w: correct program help & man page regarding arguments
authorJim Warner <james.warner@comcast.net>
Sun, 6 Sep 2015 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Mon, 7 Sep 2015 08:11:48 +0000 (18:11 +1000)
This commit is an outgrowth of the research into a bug
involving the recently added enum 'PROCPS_PIDS_extra'.

Since this program is not equipped to filter more than
one user, the help text and man document were updated.

Signed-off-by: Jim Warner <james.warner@comcast.net>
w.1
w.c

diff --git a/w.1 b/w.1
index 7537f1db5aaf58a7aaeb6c340251024dd4d3443e..a4a73ef18d89ec0440140409eb758446d129936d 100644 (file)
--- a/w.1
+++ b/w.1
@@ -1,11 +1,11 @@
 .\"             -*-Nroff-*-
 .\"
-.TH W "1" "May 2012" "procps-ng" "User Commands"
+.TH W "1" "September 2015" "procps-ng" "User Commands"
 .SH NAME
 w \- Show who is logged on and what they are doing.
 .SH SYNOPSIS
 .B w
-[\fIoptions\fR] \fIuser\fR [...]
+[\fIoptions\fR] [\fIuser\fR]
 .SH DESCRIPTION
 .B w
 displays information about the users currently on the machine, and their
diff --git a/w.c b/w.c
index 2130ce1f2606ec54615c31d617866f00d6b0866a..e4e01cc77de2808fd49b98eb9e7fc2265c81066e 100644 (file)
--- a/w.c
+++ b/w.c
@@ -496,7 +496,7 @@ static void __attribute__ ((__noreturn__))
 {
        fputs(USAGE_HEADER, out);
        fprintf(out,
-              _(" %s [options]\n"), program_invocation_short_name);
+              _(" %s [options] [user]\n"), program_invocation_short_name);
        fputs(USAGE_OPTIONS, out);
        fputs(_(" -h, --no-header     do not print header\n"),out);
        fputs(_(" -u, --no-current    ignore current process username\n"),out);