Re:Wcurl Is Here
by firesteelrain on Friday August 23, 2024 @05:23PM
(#41333229)
Good point on —location. I normally use -L. So I missed that
It does default to https as the proto-default if no scheme is provided - in your example it could default to interactively asking the user however this may fail in automated scenarios and/or hang.
Anyways it’s a good thought exercise. It’s hard to satisfy all use cases equally
The script already passes "--location", the non-shortened version of the argument.
For the other things maybe the both safer and more scalable approach is the script should see if it's being run interactively and default to interactively prompting the user for what action to take on detectable things (like missing basic auth or invalid certs for secure domains) or logging an example version of the same command to run as part of the stderr output otherwise. Apart from avoiding debate by taking a stance on what the default should be this will still be allowed by e.g. the Debian repo maintainers.