From: Junio C Hamano Date: Mon, 18 May 2009 06:14:22 GMT Subject: Re: [PATCH 2/3] parse-options: add PARSE_OPT_CUSTOM_ARGH for complicated argh's Message-ID: <7vd4a7ey4h.fsf@alter.siamese.dyndns.org> In-Reply-To: <1242557224-8411-2-git-send-email-bebarino@gmail.com> Stephen Boyd writes: > If argh is complicated, i.e. the option takes more than one argument, > don't add the brackets around argh in the usage message. I think later user wants a bit more descriptive explanation, like... Usually, argh element in struct option points at a placeholder value (e.g. "val"), and this is used to show --option= by enclosing the string inside of angle brackets. When the option takes something more complex (e.g. optional part separated by comma), you would want to produce a help that looks like --option=[,] In such a case, the caller can pass a string to argh with placeholders already enclosed in necessary angle brackets (e.g. "[,]") and set this option. Please update Documentation/technical/api-parse-options.txt as well.