summaryrefslogtreecommitdiffstats
path: root/misc-utils/look.c
diff options
context:
space:
mode:
authorBenno Schulenberg2014-12-24 17:56:08 +0100
committerKarel Zak2015-01-06 11:46:11 +0100
commitdfe6a6d0857f56ff96b6eef3e41136026e71d3aa (patch)
tree772e89e3889dfaf786a5baed4a08aeed853ca431 /misc-utils/look.c
parentcolcrt: slice up the usage text for ease of translation (diff)
downloadkernel-qcow2-util-linux-dfe6a6d0857f56ff96b6eef3e41136026e71d3aa.tar.gz
kernel-qcow2-util-linux-dfe6a6d0857f56ff96b6eef3e41136026e71d3aa.tar.xz
kernel-qcow2-util-linux-dfe6a6d0857f56ff96b6eef3e41136026e71d3aa.zip
look: slice up the usage text for ease of translation
Also use the standard macros, and correct the synopsis: use angular brackets and show that look accepts multiple files. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Diffstat (limited to 'misc-utils/look.c')
-rw-r--r--misc-utils/look.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/misc-utils/look.c b/misc-utils/look.c
index 50bc4f47d..dc6a8d0fc 100644
--- a/misc-utils/look.c
+++ b/misc-utils/look.c
@@ -364,20 +364,21 @@ compare(char *s2, char *s2end) {
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
fputs(USAGE_HEADER, out);
- fprintf(out,
- _(" %s [options] string [file]\n"), program_invocation_short_name);
+ fprintf(out, _(" %s [options] <string> [<file>...]\n"), program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
fputs(_("Display lines beginning with a specified string.\n"), out);
fputs(USAGE_OPTIONS, out);
- fputs(_(" -a, --alternative use alternative dictionary\n"
- " -d, --alphanum compare only alphanumeric characters\n"
- " -f, --ignore-case ignore case differences when comparing\n"
- " -t, --terminate <char> define string termination character\n"
- " -V, --version output version information and exit\n"
- " -h, --help display this help and exit\n\n"), out);
+ fputs(_(" -a, --alternative use the alternative dictionary\n"), out);
+ fputs(_(" -d, --alphanum compare only alphanumeric characters\n"), out);
+ fputs(_(" -f, --ignore-case ignore case differences when comparing\n"), out);
+ fputs(_(" -t, --terminate <char> define the string-termination character\n"), out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
fprintf(out, USAGE_MAN_TAIL("look(1)"));
+
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}