Re: Reference upload glob pieces in output filename

Bastian Jesuiter via curl-users <[email protected]> Wed, 22 Apr 2026 09:57:56 +0200
Newsgroups gmane.comp.web.curl.general
Message-ID <CAL07qPXT7k_mMDa0Y9noybrMuDDNScGSzws39M7++Qyifht8cA@mail.gmail.com>
--===============3925550820626052432==
Content-Type: multipart/alternative; boundary="0000000000007d6ce3065007e48f"

--0000000000007d6ce3065007e48f
Content-Type: text/plain; charset="UTF-8"

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, <
[email protected]> 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
>

--0000000000007d6ce3065007e48f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Hi,=C2=A0<div dir=3D"auto"><br></div><div dir=3D"auto">I =
like the idea, but having multiple implicit solvers might create confusion.=
=C2=A0</div><div dir=3D"auto">If I were to use such a feature, I&#39;d see =
myself constantly re-checking docs to see if I have the correct one.=C2=A0<=
/div><div dir=3D"auto"><br></div><div dir=3D"auto">Would something more exp=
licit, like something close or similar to regex named groups possible to ci=
rcumvent such a confusion?=C2=A0</div><div dir=3D"auto"><br></div><div dir=
=3D"auto">Bastian</div></div><br><div class=3D"gmail_quote gmail_quote_cont=
ainer"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, 22 Apr 2026, 09:53 Dan=
iel Stenberg via curl-users, &lt;<a href=3D"mailto:[email protected]=
">[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex">On Wed, 22 Apr 2026, Stefan Eissing wrote:<br>
<br>
&gt;&gt;=C2=A0 curl -T &#39;file{1,2,3}&#39; <a href=3D"https://upload.exam=
ple/" rel=3D"noreferrer noreferrer" target=3D"_blank">https://upload.exampl=
e/</a> -o &#39;response-!1&#39;<br>
&gt;&gt;<br>
&gt;&gt; Maybe we can think of a better way?<br>
&gt;<br>
&gt; Have not looked at the internals. As a user, I would expect `-o &#39;s=
ave-#1&#39; to <br>
&gt; also work for uploads.<br>
&gt;<br>
&gt; (I assume the #1 counter only counts url globs and not upload globs, b=
ut <br>
&gt; that is an implementation detail, or?)<br>
<br>
Here&#39;s an example that shows why they need to be different (in some way=
):<br>
<br>
=C2=A0 =C2=A0curl -T &#39;file{1,2,3}&#39; <a href=3D"https://upload.exampl=
e/%7Bthis,that%7D" rel=3D"noreferrer noreferrer" target=3D"_blank">https://=
upload.example/{this,that}</a> -o &#39;response-!1-#1&#39;<br>
<br>
-- <br>
<br>
=C2=A0 / <a href=3D"http://daniel.haxx.se" rel=3D"noreferrer noreferrer" ta=
rget=3D"_blank">daniel.haxx.se</a> || <a href=3D"https://rock-solid.curl.de=
v" rel=3D"noreferrer noreferrer" target=3D"_blank">https://rock-solid.curl.=
dev</a><br>
-- <br>
Unsubscribe: <a href=3D"https://lists.haxx.se/mailman/listinfo/curl-users" =
rel=3D"noreferrer noreferrer" target=3D"_blank">https://lists.haxx.se/mailm=
an/listinfo/curl-users</a><br>
Etiquette:=C2=A0 =C2=A0<a href=3D"https://curl.se/mail/etiquette.html" rel=
=3D"noreferrer noreferrer" target=3D"_blank">https://curl.se/mail/etiquette=
.html</a><br>
</blockquote></div>

--0000000000007d6ce3065007e48f--

--===============3925550820626052432==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html

--===============3925550820626052432==--