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 10:29:31 -0500


On 11-Mar-22 09:58, Jeremy Nicoll via curl-users wrote:
> On Fri, 11 Mar 2022, at 13:34, Timothe Litt via curl-users wrote:
>> On 11-Mar-22 08:06, Jeremy Nicoll via curl-users wrote:
>>> Forgive my ignorance but is completion.pl part of curl? If not, it's surely
>>> a side issue?
>> As I noted, it's in the scripts/ directory of the curl tree.  It's not a
>> side issue in that it's an alternative way to make typing curl commands
>> easier/faster.
> The thing is, "the curl tree" isn't something I've ever seen. I just download and
> use the curl binary (originally on RISC OS, nowadays Windows) and the idea
> that there's scripts /at all/ is news to me - except for those I write for myself,
> mainly in various flavours of REXX.

The idea would be for curl distributions to include the autocompletion
script(s) for platforms that support them, and include them in the
install script.  At least optionally.  How they get generated is an
issue for the developers.

Strangely enough, your platform isn't bereft of native command completion!

I believe windows PowerShell has extensible command completion for
parameters. (Even cmd has completion for filenames, but I don't think
it's extensible to options/non-file parameters.)

See
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions_argument_completion

I haven't tried to implement using it, but at first glance it looks
functionally equivalent to  Unix shell completion.

PowerShell may be bundled in some products, but can easily be installed.
https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows

So it's a SMOP to get scripts/completion.pl to generate that format
too.  Assuming there's demand & a developer willing to invest the effort...

There are, of course, multiple ways to run bash under windows as well.

FWIW PowerShell is also available (as is bash) for Linux & Mac, and
Docker.  I don't know how popular it is there.

[SMOP = "Small Matter Of Programming"]

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