Re: Why I no longer use Copy as cURL

Paul Gilmartin via curl-users <[email protected]> Fri, 25 Jul 2025 12:46:10 -0600
Newsgroups gmane.comp.web.curl.general
Message-ID <[email protected]>
On 7/25/25 07:53, Paul Dewhirst via curl-users wrote:
>     ...
> However Copy as cURL is dangerous because you are pasting something received over the Internet
> into your Command Prompt window (or the equivalent for other operating systems).
>     ...
Ouch!  I hadn't thought of that.  On MacOS I  have a script that
does something like:
     curl <options,> "$( pbpaste )".
but that can fail if the pasteboard content bagins with "-".

I imagine no solution short of two coordinated
enhancement requests:
To curl:
     a new option, "--URL <url>" which must appear last
     and recognizes no punctuation such as "-" in <url>.
To Firefox:
     Invoke curl not by pasting something into your
     Command Prompt window, but by such as:
     fork; execlp( "curl" [,options], "--URL <url> );
(dreadfully not portable.)

I could modify my script to prohibit URLs beginning
wit "-".

-- 
gil

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