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: Timothe Litt <litt_at_acm.org>
Date: Fri, 11 Mar 2022 08:48:52 -0500


On 11-Mar-22 08:33, Daniel Stenberg wrote:
> On Fri, 11 Mar 2022, Timothe Litt via curl-users wrote:
>
>> script scripts/completion.pl looks like it will extract known options
>> from the help and generate a completion scrip.  It claims to support
>> fish and zsh.  Adding bash would require some work, but once done,
>> should be low maintenance.
>
> I agree. There even already exists such a script, just not made by us.
> Debian ships/shipped one that used to work pretty well, but for some
> reason it vanished from my system in some upgrade and I don't know
> what happened to it. (I'm a bash user on Debian)
>
> It might be this one:
>
> https://github.com/scop/bash-completion/blob/master/completions/curl
>
> --
>
Er, that's the same one I mentioned in my note :-)

The advantage of updating scripts/completion.pl is that it's a
completion script generator.  Once it learns about bash syntax, new
options are added automagically if its run during the curl build.   Only
new syntaxes would require updating the generator. And, of course, more
shells can be added if there's demand/energy.

The one we found on github would have to be updated every time you add
or change an option - which isn't rare...  Think of it as something that
could have been produced by scripts/completion.pl (but probably was
hand-crafted).  curl could pull it in, but unless you set up a
relationship with that project, it's likely to always lag curl
releases.  Conversely, if curl builds generate a satisfactory script,
curl could push to that repo in addition to distributing it yourself.

Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.


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