Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tool_getparam: make --url support a file with URLs #16099

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Jan 27, 2025

Mentioned in the --url documentation.

The list of URLs provided in a file disables globbing per URL and works as if there is a-O/--remote-name for every individual URL.

This makes it possible to use a URL file and then do stand-alone URLs on the command line like normal.

The URL list from file support is meant to be rather simple. Someone who wants fancy and more advanced features per URL can always just generate a config file using a wrapper script and pass that to curl.

Test 487 and 488 verify.

@bagder
Copy link
Member Author

bagder commented Jan 27, 2025

Should we support # comments?

@bagder bagder added the feature-window A merge of this requires an open feature window label Jan 27, 2025
@dfandrich
Copy link
Contributor

Just to highlight this for anyone who might want to try out the PR, --url with a file operates different from --url without a file, namely it enables the --remote-name and --globoff options for the URLs in the file only. So, the behaviour of --url u1 --url u2 --url u3 is different from --url @file with u1 u2 u3 contained in file. This behaviour is probably what users usually want, but it's different and inconsistent enough from established --url behaviour that I think it deserves its own option (--url-file maybe). It would be interesting to hear others' opinions.

@pheiduck
Copy link
Contributor

pheiduck commented Feb 5, 2025

I'm looking forward to it replacing a script that I'm currently using.

bagder added a commit that referenced this pull request Feb 22, 2025
Mention in the --url documentation.

Test 487 and 488 verify.

Closes #16099
It implies -O used for each URL.

Mention in the --url documentation.

Test 488 and 489 verify.

Closes #16099
@bagder bagder closed this in 6306476 Feb 25, 2025
@bagder bagder deleted the bagder/url-file branch February 25, 2025 08:17
icing pushed a commit to icing/curl that referenced this pull request Feb 25, 2025
It implies -O used for each URL.

Mention in the --url documentation.

Test 488 and 489 verify.

Closes curl#16099
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmdline tool feature-window A merge of this requires an open feature window tests
Development

Successfully merging this pull request may close these issues.

3 participants