doc: improve usage string in MyFirstContribution

We implement a command called git-psuh which accept arguments, so let's
show that it accepts arguments in the doc and the usage string.

While at it, we need to prepare "a NULL-terminated array of usage strings",
not just "a NULL-terminated usage string".

Helped-by: Emily Shaffer <emilyshaffer@google.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Christian Couder
2019-06-22 08:10:35 +02:00
committed by Junio C Hamano
parent 2656fb16dd
commit b37e0ec32b

View File

@ -428,7 +428,7 @@ git-psuh - Delight users' typo with a shy horse
SYNOPSIS SYNOPSIS
-------- --------
[verse] [verse]
'git-psuh' 'git-psuh [<arg>...]'
DESCRIPTION DESCRIPTION
----------- -----------
@ -491,14 +491,16 @@ Take a look at `Documentation/technical/api-parse-options.txt`. This is a handy
tool for pulling out options you need to be able to handle, and it takes a tool for pulling out options you need to be able to handle, and it takes a
usage string. usage string.
In order to use it, we'll need to prepare a NULL-terminated usage string and a In order to use it, we'll need to prepare a NULL-terminated array of usage
`builtin_psuh_options` array. Add a line to `#include "parse-options.h"`. strings and a `builtin_psuh_options` array.
At global scope, add your usage: Add a line to `#include "parse-options.h"`.
At global scope, add your array of usage strings:
---- ----
static const char * const psuh_usage[] = { static const char * const psuh_usage[] = {
N_("git psuh"), N_("git psuh [<arg>...]"),
NULL, NULL,
}; };
---- ----