5 ms·
I think he may be missing what people mean by "it's easier without an argument". It's not just "only one option" - what I see in reality quite often is: "curl h
by viraptor 12y ago
I think he may be missing what people mean by "it's easier without an argument". It's not just "only one option" - what I see in reality quite often is: "curl http://..." http://...", screen is filled with garbage, ctrl-c, ctrl-c, ctrl-c, damn I'm on a remote host and ssh needs to catch up, ctrl-c, "cur...", actually terminal is broken and I'm writing garbage now, "reset", "wget http://..." http://...".
I'm not saying he should change it. But if he thinks it's about typing less... he doesn't seem to realise how his users behave.
- skywhopper 12y agoWhich users? I only ever use curl to print stuff to stdout, but I use it for that a lot. When I want to download a file as lazily as possible, I use wget. If you don't use the tools often enough to remember how they work, I don't think your needs are going to come up high on the developer's priority list.
- viraptor 12y agoThat's my approach too. But he wrote himself "a very common comment to me about curl" - if someone actually finds the time / motivation to write to him about this difference, I'd count them as a user.
- akerl_ 12y agoMaybe they count as a user, but they count comparatively to all the people who don't write him. I'd hardly expect him to get tweets and emails saying "It was so great how your tool printed what I wanted to stdout", even in cases where people do prefer that. It's tough to get a representative sample from something like voluntary correspondence, because it doesn't tell you the majority opinion, just the majority opinion from people who decided to write in. EDIT: To note, it's entirely possible that the silent majority of curl users really do hate the default-to-stdout choice. But absent a real way of surveying, it's difficult to make a call either way.
- yawboakye 12y agoTurns out it depends on which tool you learned first (my case and many others mentioned here). I'm not ashamed to say I've always used cURL for everything and never installed wget. wget is awesome but cURL serves me right. I do a lot of HTTP and API stuff so I only need the headers most of the time. If I want to examine the (usually) JSON output of a call, I pipe to a custom alias that combines pygments (http://pygments.org http://pygments.org) and `python -m json.tool` to beautifully format it. (alias pretty='/usr/bin/python -m json.tool | /usr/local/bin/pygmentize -O style=monokai -f console256 -g')
- yason 12y agoThat's the reason I use wget and only when necessary I switch to curl. It's not that I wouldn't forget about that nasty behaviour (eventhough I sometimes do forget) but it usually goes like this: $ curl -o news.ycombinator.com curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information $ curl -O news.ycombinator.com curl: Remote file name has no length! curl: try 'curl --help' or 'curl --manual' for more information $ curl -O foo news.ycombinator.com curl: Remote file name has no length! curl: try 'curl --help' or 'curl --manual' for more information <html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white"> <center><h1>301 Moved Permanently</h1></center> <hr><center>nginx</center> </body> </html> $ wget news.ycombinator.com --2014-11-17 14:27:18-- http://news.ycombinator.com/ Resolving news.ycombinator.com (news.ycombinator.com)... 198.41.191.47, 198.41.190.47 Connecting to news.ycombinator.com (news.ycombinator.com)|198.41.191.47|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://news.ycombinator.com/ [following] --2014-11-17 14:27:19-- https://news.ycombinator.com/ Connecting to news.ycombinator.com (news.ycombinator.com)|198.41.191.47|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: ‘index.html’ [ <=> ] 22,353 --.-K/s in 0.07s 2014-11-17 14:27:19 (331 KB/s) - ‘index.html’ saved [22353] With wget, I can just through any URL to it and it‘ll probably do the right thing with the least amount of surprises. „Grab a file“ is my usecase 99.99% of the time, „Print a file“ is the rest 0.01%.
- Touche 12y agoI asked this of someone else, just out of curiosity, why do you find yourself downloading content from http that often? What are you doing with these files?
- dec0dedab0de 12y agoOn my laptop, to view something while offline. On a server, to install something that is not in a package manager.
- duaneb 12y agoMost of the time I'm using curl, I want to see the output. Otherwise I start it with >output.file.
- kybernetyk 12y ago>I'm not saying he should change it. I'd say that it's too late for a change. Changing the default behaviour would break way too many existing scripts and cronjobs.