public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 3/7] whereis: align with howto-usage-function.txt
Date: Sat, 16 Mar 2013 23:40:15 +0000	[thread overview]
Message-ID: <1363477219-29245-4-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1363477219-29245-1-git-send-email-kerolasa@iki.fi>

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 misc-utils/whereis.c | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c
index f579e29..e3cfb5f 100644
--- a/misc-utils/whereis.c
+++ b/misc-utils/whereis.c
@@ -154,24 +154,21 @@ static const char *srcdirs[] = {
 
 static void __attribute__((__noreturn__)) usage(FILE *out)
 {
-	fputs(_("\nUsage:\n"), out);
-	fprintf(out,
-	      _(" %s [options] file\n"), program_invocation_short_name);
-
-	fputs(_("\nOptions:\n"), out);
-	fputs(_(" -f <file>  define search scope\n"
-		" -b         search only for binaries\n"
-		" -B <dirs>  define binaries lookup path\n"
-		" -m         search only for manuals\n"
-		" -M <dirs>  define man lookup path\n"
-		" -s         search only for sources\n"
-		" -S <dirs>  define sources lookup path\n"
-		" -u         search for unusual entries\n"
-		" -l         output effective lookup paths\n"
-		" -V         output version information and exit\n"
-		" -h         display this help and exit\n\n"), out);
-
-	fputs(_("See how to use file and dirs arguments from whereis(1) manual.\n"), out);
+	fputs(USAGE_HEADER, out);
+	fprintf(out, _(" %s [options] file\n"), program_invocation_short_name);
+
+	fputs(USAGE_OPTIONS, out);
+	fputs(_(" -b         search only for binaries\n"), out);
+	fputs(_(" -B <dirs>  define binaries lookup path\n"), out);
+	fputs(_(" -m         search only for manuals\n"), out);
+	fputs(_(" -M <dirs>  define man lookup path\n"), out);
+	fputs(_(" -s         search only for sources\n"), out);
+	fputs(_(" -S <dirs>  define sources lookup path\n"), out);
+	fputs(_(" -f         terminate <dirs> argument list\n"), out);
+	fputs(_(" -u         search for unusual entries\n"), out);
+	fputs(_(" -l         output effective lookup paths\n"), out);
+	fprintf(out, USAGE_MAN_TAIL("whereis(1)"));
+
 	exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
 }
 
-- 
1.8.2


  parent reply	other threads:[~2013-03-16 23:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-16 23:40 [PATCH 0/7] pull: whereis changes Sami Kerola
2013-03-16 23:40 ` [PATCH 1/7] whereis: rewrite most of the command Sami Kerola
2013-03-16 23:40 ` [PATCH 2/7] whereis: add search scope listing option Sami Kerola
2013-03-16 23:40 ` Sami Kerola [this message]
2013-03-16 23:40 ` [PATCH 4/7] whereis: support MANPATH environment variable Sami Kerola
2013-03-16 23:40 ` [PATCH 5/7] docs: generic whereis.1 clean up Sami Kerola
2013-03-16 23:40 ` [PATCH 6/7] whereis: canonicalize files before printing Sami Kerola
2013-03-20 12:56   ` Karel Zak
2013-03-20 14:03     ` Sami Kerola
2013-03-16 23:40 ` [PATCH 7/7] whereis: remove duplicates from search results Sami Kerola
2013-03-20 12:59   ` Karel Zak
2013-03-17  9:23 ` [PATCH 0/7] pull: whereis changes Sami Kerola
2013-03-20 13:02 ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1363477219-29245-4-git-send-email-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox