summaryrefslogtreecommitdiffstats
path: root/text-utils
diff options
context:
space:
mode:
authorRuediger Meier2017-06-25 14:49:47 +0200
committerRuediger Meier2017-06-27 12:28:36 +0200
commitb30544549505019f5fc092c5d99fcb1cae1a44b1 (patch)
treeb22fa305e99ed2bfa3bdeb145e8094874b631754 /text-utils
parentmisc: introduce print_usage_help_options() (diff)
downloadkernel-qcow2-util-linux-b30544549505019f5fc092c5d99fcb1cae1a44b1.tar.gz
kernel-qcow2-util-linux-b30544549505019f5fc092c5d99fcb1cae1a44b1.tar.xz
kernel-qcow2-util-linux-b30544549505019f5fc092c5d99fcb1cae1a44b1.zip
misc: consolidate all --help option descriptions
Now we are always using the same text also for commands which had still hardcoded descriptions or where we can't use the standard print_usage_help_options macro. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'text-utils')
-rw-r--r--text-utils/col.c6
-rw-r--r--text-utils/more.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/text-utils/col.c b/text-utils/col.c
index a473e55fb..01ee61b27 100644
--- a/text-utils/col.c
+++ b/text-utils/col.c
@@ -142,9 +142,11 @@ static void __attribute__((__noreturn__)) usage(void)
" -h, --tabs convert spaces to tabs\n"
" -x, --spaces convert tabs to spaces\n"
" -l, --lines NUM buffer at least NUM lines\n"
- " -V, --version output version information and exit\n"
- " -H, --help display this help and exit\n\n"));
+ ));
+ printf( " -H, --help %s\n", USAGE_OPTSTR_HELP);
+ printf( " -V, --version %s\n", USAGE_OPTSTR_VERSION);
+ fputs(USAGE_SEPARATOR, out);
fprintf(out, _(
"%s reads from standard input and writes to standard output\n\n"),
program_invocation_short_name);
diff --git a/text-utils/more.c b/text-utils/more.c
index 35786567a..2a7917120 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -247,8 +247,8 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(_(" +/<string> display file beginning from search string match\n"), out);
fputs(USAGE_SEPARATOR, out);
- fputs(_(" --help display this help and exit\n"), out);
- fputs(_(" -V, --version output version information and exit\n"), out);
+ printf( " --help %s\n", USAGE_OPTSTR_HELP);
+ printf( " -V, --version %s\n", USAGE_OPTSTR_VERSION);
fprintf(out, USAGE_MAN_TAIL("more(1)"));
exit(EXIT_SUCCESS);
}