Re:Curl doesn’t spew binary anymore
by x0 on Saturday June 17, 2017 @07:32AM
(#14575387)
Is there going to be a ~/.curlrc option so I can turn this off? Else I suppose I can add -o- to my curl alias.
[ Parent
| on HN ]
I'll probably just add "| cat" on in the rare case when I want unfiltered output, then I don't need to memorize any options. That's what I do with ls when I temporarily don't want colorized output.
-o- seems like a terrible idea in a curl alias. Why do you want cURL to print binary data to your terminal? The check disables if you're redirecting output (> or |).
Re:Curl doesn’t spew binary anymore
by dullgiulio on Saturday June 17, 2017 @08:53AM
(#14575688)
You could simply write a wrapper that reads an options file.
In general, it's a bad idea to have a hidden state such as a configuration file. Imagine, for examples, scripts that expect the standard curl behaviour, but your configuration file changes that.
(Of course setting shell aliases has the same problem...)
Shell aliases do not have that problem as they're generally used with interactive shells only. Non-interactive shells tend to read a different set of configuration files for that reason.