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.

Re: Reference upload glob pieces in output filename

From: Bastian Jesuiter via curl-users <curl-users_at_lists.haxx.se>
Date: Wed, 22 Apr 2026 09:57:56 +0200

Hi,

I like the idea, but having multiple implicit solvers might create
confusion.
If I were to use such a feature, I'd see myself constantly re-checking docs
to see if I have the correct one.

Would something more explicit, like something close or similar to regex
named groups possible to circumvent such a confusion?

Bastian

On Wed, 22 Apr 2026, 09:53 Daniel Stenberg via curl-users, <
curl-users_at_lists.haxx.se> wrote:

> On Wed, 22 Apr 2026, Stefan Eissing wrote:
>
> >> curl -T 'file{1,2,3}' https://upload.example/ -o 'response-!1'
> >>
> >> Maybe we can think of a better way?
> >
> > Have not looked at the internals. As a user, I would expect `-o
> 'save-#1' to
> > also work for uploads.
> >
> > (I assume the #1 counter only counts url globs and not upload globs, but
> > that is an implementation detail, or?)
>
> Here's an example that shows why they need to be different (in some way):
>
> curl -T 'file{1,2,3}' https://upload.example/{this,that} -o
> 'response-!1-#1'
>
> --
>
> / daniel.haxx.se || https://rock-solid.curl.dev
> --
> Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
> Etiquette: https://curl.se/mail/etiquette.html
>


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2026-04-22