mirror of
https://github.com/curl/curl.git
synced 2026-08-05 08:46:15 +03:00
tool_getparam: add support for --longopt=value
If the long option name ends with an equals sign (`=`), the argument is the text following on its right side. This makes the command line parser accept this common style in addition to the existing way to accept option arguments more similar to how other command line tools do. Example: `curl --user-agent=curl-2000 https://example.com/` Change a few existing tests to use this syntax: 206, 1333, 1335, 1442
This commit is contained in:
parent
c4430c542a
commit
520e9b4fd4
6 changed files with 30 additions and 6 deletions
|
|
@ -24,6 +24,9 @@ When --next is used, it resets the parser state and you start again with a
|
|||
clean option state, except for the options that are global. Global options
|
||||
retain their values and meaning even after --next.
|
||||
|
||||
If the long option name ends with an equals sign (`=`), the argument is the
|
||||
text following on its right side. (Added in 8.16.0)
|
||||
|
||||
The first argument that is exactly two dashes (`--`), marks the end of
|
||||
options; any argument after the end of options is interpreted as a URL
|
||||
argument even if it starts with a dash.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue