tool_urlglob: add named globs#21409
Conversation
|
Blurgh, using |
|
Flaky Azure Ubuntu install failures should hopefully be gone after a rebase. |
Idea-by: Bastian Jesuiter Verified by test 2408 and 2409 Closes #21409
7a4dcf1 to
173d6d5
Compare
There was a problem hiding this comment.
Pull request overview
Adds support for named URL globs in the curl tool’s URL globbing parser, allowing glob components in a URL to be named and then referenced from --output using #<name>.
Changes:
- Extend
tool_urlglobpatterns with an optionalnameand parse<name>after{/[. - Add output filename expansion support for
#<name>references (in addition to#1,#2, ...). - Add new test cases (2408/2409) and document the new syntax.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/tool_urlglob.h |
Adds name field to URLPattern to store an optional glob name. |
src/tool_urlglob.c |
Parses <name> in URL globs, expands #<name> in output templates, and frees allocated names. |
tests/data/test2408 |
New test for named {...} globs referenced by name in -o. |
tests/data/test2409 |
New test for named [...] globs referenced by name in -o. |
tests/data/Makefile.am |
Registers the new tests in the test suite list. |
docs/cmdline-opts/output.md |
Documents named glob references in --output and provides examples. |
docs/cmdline-opts/_GLOBBING.md |
Documents named glob syntax in URLs and how output references work. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Idea-by: Bastian Jesuiter Verified by test 2408, 2409 and 2410. Closes #21409
173d6d5 to
43a4b31
Compare
Idea-by: Bastian Jesuiter Verified by test 2408 - 2411 Closes #21409
c241951 to
a9b998d
Compare
|
augment review |
🤖 Augment PR SummarySummary: This PR adds support for named URL glob parts, allowing users to reference specific glob components when generating output filenames. Changes:
Technical notes: Names are case-sensitive, length-limited, and are freed during glob cleanup; unknown named references produce a hard error. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Idea-by: Bastian Jesuiter Verified by test 2408 - 2411 Closes #21409
0cfe637 to
e4ee82e
Compare
Idea-by: Bastian Jesuiter Verified by test 2408 - 2411 Closes #21409
e4ee82e to
d37b878
Compare
Idea-by: Bastian Jesuiter Verified by test 2408 - 2411 Closes curl#21409
Idea-by: Bastian Jesuiter
Verified by test 2408 - 2411