curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Two-letter options?

From: Eero Aaltonen via curl-users <curl-users_at_lists.haxx.se>
Date: Fri, 11 Mar 2022 15:57:12 +0200

On Fri, 2022-03-11 at 07:24 -0500, Timothe Litt via curl-users wrote:
> On 11-Mar-22 04:38, Daniel Stenberg via curl-users wrote:
> >
> > Over on Twitter, Leah Neukirchen brought an interesting idea for
> > curl command line options.
> >
> > We have basically run out of single-letter options (practically
> > speaking only -W, -5, -7, -8, -9 are left usused), making all new
> > options forced to be long versions only. Like the newly introduced
> > --remove-on-error [1].
> >
> > The proposal is that we "repurpose" using *two* boolean single-
> > letter options and give them a unique meaning. For example, we can
> > make "-ff" to mean something, or "-ss", "-aa" etc.

I usually try to follow IEEE Std 1003.1-2017 Utility Syntax Guidelines
whenever possible, but
* the design of those recommendations is somewhat coupled with getopt
* as you said you've run out of short options

I've had very good experiences with the various implementations of
docopt https://github.com/docopt , they've allowed me to shift my focus
on the design, documentation and general usability of the CLI.

-- 
BR, Eero
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-03-11