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.

Two-letter options?

From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Fri, 11 Mar 2022 10:38:20 +0100 (CET)

Hello!

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.

Using this method we could make -ff equal to --remove-on-error while still
having -f mean --fail.

There is for sure a small set of users somewhere that use "-ff" already, that
now are just setting --fail twice, and those would be negatively affected by
such a change.

Another, maybe slightly uglier but safer as it wouldn't risk any existing
duplicate option using users, way to introduce two-letter options is to use
one of the currently unused characters. -f9 could be made to mean
--remove-on-error. The use of an adjacent '9' could then be used to extend any
single-letter option to make a two-letter option. Or we could prefix it with a
'9' and make a new family of ~60 available two-letter options like '-9f' (and
'9' here could of course be 'W' instead etc).

Thoughts?

[1] = https://daniel.haxx.se/blog/2022/03/11/remove-leftovers-on-curl-error/

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-03-11