From: Karel Zak Date: Wed, 21 Jun 2017 09:25:55 +0000 (+0200) Subject: docs: add program-desc to howto-usage-function.txt and boilerplate.c X-Git-Tag: v2.31-rc1~277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e258f388a92817aeaef9ec42909bf63470d0454;p=thirdparty%2Futil-linux.git docs: add program-desc to howto-usage-function.txt and boilerplate.c Signed-off-by: Karel Zak --- diff --git a/Documentation/boilerplate.c b/Documentation/boilerplate.c index 057893bfb3..5b2e59b8a3 100644 --- a/Documentation/boilerplate.c +++ b/Documentation/boilerplate.c @@ -33,6 +33,10 @@ static void __attribute__((__noreturn__)) usage(FILE *out) { fputs(USAGE_HEADER, out); fprintf(out, _(" %s [options] file...\n"), program_invocation_short_name); + + fputs(USAGE_SEPARATOR, out); + fputs(_("Short program description.\n"), out); + fputs(USAGE_FUNCTIONS, out); fputs(_(" -s, --do-something some specific task\n"), out); fputs(_(" -o, --do-other some different task\n"), out); diff --git a/Documentation/howto-usage-function.txt b/Documentation/howto-usage-function.txt index 8da8debe5f..3496b49149 100644 --- a/Documentation/howto-usage-function.txt +++ b/Documentation/howto-usage-function.txt @@ -42,6 +42,8 @@ look like. Usage: program [options] [...] +Short program description, ideally one line only. + Options: -n, --no-argument option does not use argument --optional[=] option argument is optional