curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support. 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 Daniel himself.

supporting --longopt=value

From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Tue, 1 Jul 2025 11:12:15 +0200 (CEST)

Hello friends,

The curl command line parser is a custom parser that acts slightly different
than many other command line tools.

One particular difference is how arguments to long options are provided:
space-separated from the option itself. Like this when setting the user agent:

   curl --user-agent curl-2000 https://example.com/

Many other command line tools instead uses the equals-sign-approach, where the
argument is instead specified immediately next to the flag like this:

   curl --user-agent=curl-2000 https://example.com/

I am now proposing a PR for curl that makes it add support for the latter
syntax in addition to the previous, which then perhaps makes curl a bit more
aligned with the rest of the world: https://github.com/curl/curl/pull/17789

If we deem this fine, it might be merged for the 8.16.0 release (Sep 2025).

Since this would introduce support for a syntax that is not supported by older
curl versions, I would expect that not too many users will actually use this
command line style for the first few years until the new parser is in more
widespread use.

Thoughts?

-- 
  / daniel.haxx.se || https://rock-solid.curl.dev
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2025-07-01