diff options
author | Sami Kerola | 2013-03-16 21:25:17 +0100 |
---|---|---|
committer | Karel Zak | 2013-03-19 16:03:19 +0100 |
commit | ec3bc7aaf486122fa5bb190a4fb18a9d5989d950 (patch) | |
tree | 94034d3e6d0ce1a6dca476abc433158c8caca9a2 /misc-utils/whereis.c | |
parent | whereis: add search scope listing option (diff) | |
download | kernel-qcow2-util-linux-ec3bc7aaf486122fa5bb190a4fb18a9d5989d950.tar.gz kernel-qcow2-util-linux-ec3bc7aaf486122fa5bb190a4fb18a9d5989d950.tar.xz kernel-qcow2-util-linux-ec3bc7aaf486122fa5bb190a4fb18a9d5989d950.zip |
whereis: align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/whereis.c')
-rw-r--r-- | misc-utils/whereis.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c index 0f14267f3..1819f7c64 100644 --- a/misc-utils/whereis.c +++ b/misc-utils/whereis.c @@ -163,24 +163,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); } |