[TUHS] Systematic approach to command-line interfaces

John Cowan cowan at ccil.org
Sun Aug 1 03:46:28 AEST 2021


On Sat, Jul 31, 2021 at 1:39 PM Anthony Martin <ality at pbrane.org> wrote:


> You're missing the approach taken in Plan 9 (and
> 10th edition Unix): put related commands in a
> directory and use a shell that doesn't restrict
> the first argument of a command to a single path
> element.
>

What that doesn't give you is the ability to say "git <git-options> diff
<git-diff-options>", which is very nice and makes the inconsistencies I
just posted on less likely.  Fortunately, any getopt-variant can deal with
these; you just have to pass the tail of argv and a suitably reduced value
for argc to another call of the options parser.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20210731/244dcf8e/attachment.htm>


More information about the TUHS mailing list