{"id":371,"date":"2008-06-03T13:35:33","date_gmt":"2008-06-03T11:35:33","guid":{"rendered":"http:\/\/daniel.haxx.se\/blog\/?p=371"},"modified":"2008-06-10T20:17:54","modified_gmt":"2008-06-10T18:17:54","slug":"curl-needs-a-fresh-take-on-command-line-options","status":"publish","type":"post","link":"https:\/\/daniel.haxx.se\/blog\/2008\/06\/03\/curl-needs-a-fresh-take-on-command-line-options\/","title":{"rendered":"curl needs a fresh take on command line options"},"content":{"rendered":"<p>I <a href=\"http:\/\/curl.haxx.se\/mail\/archive-2008-06\/0009.html\">just posted about this<\/a> on the <a href=\"http:\/\/cool.haxx.se\/mailman\/listinfo\/curl-users\">curl-users mailing list<\/a> and I&#8217;ll just echo it here to reach a slightly larger audience:<\/p>\n<p>One of the not so good behaviors of curl is how many of the command line options work when being repeated: toggling on\/off.<\/p>\n<p>We&#8217;ve got bug reports about this in the past and I know for a fact that this behavior has burnt more than one guy who&#8217;s tried to set default options for curl in their .curlrc etc. When they then re-use the same option on the command line or in a script, it effectively disables the option again&#8230;<\/p>\n<p><a href=\"http:\/\/curl.haxx.se\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft alignnone size-medium wp-image-64\" style=\"margin: 8px; float: left;\" title=\"cURL\" src=\"http:\/\/daniel.haxx.se\/blog\/wp-content\/uploads\/2007\/09\/curl-keywords300.jpg\" alt=\"\" width=\"300\" height=\"110\" \/><\/a>I&#8217;d like this corrected. I want people to be able to explicitly enable and disable features with the command line options. I think the toggling is very rarely useful and something we can just abandon &#8211; unless we can figure out a way to keep it for backwards compatibility when we introduce the new behavior.<\/p>\n<p>I&#8217;m willing to sacrifice some backwards compatibility to get this done, but I would of course like to hurt as few users as possible.<\/p>\n<p>I&#8217;m very interested to get ideas and feedback from you guys on how we can accomplish this!<\/p>\n<p>My first thoughts on how to do this, is simply to convert all the current options to <strong>enable<\/strong> options and then introduce a new concept that negates the option. Like -v or &#8211;verbose to enable verbose, and &#8211;no-verbose to disable verbose.<\/p>\n<p>Any bright ideas?<\/p>\n<p><strong>Update: <\/strong>my suggestion above is what has now been committed targeted for the upcoming 7.19.0 release&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just posted about this on the curl-users mailing list and I&#8217;ll just echo it here to reach a slightly larger audience: One of the not so good behaviors of curl is how many of the command line options work when being repeated: toggling on\/off. We&#8217;ve got bug reports about this in the past and &hellip; <a href=\"https:\/\/daniel.haxx.se\/blog\/2008\/06\/03\/curl-needs-a-fresh-take-on-command-line-options\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">curl needs a fresh take on command line options<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[214,33],"class_list":["post-371","post","type-post","status-publish","format-standard","hentry","category-curl","tag-command-line","tag-curl-and-libcurl"],"_links":{"self":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/comments?post=371"}],"version-history":[{"count":0,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/371\/revisions"}],"wp:attachment":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/media?parent=371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/categories?post=371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/tags?post=371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}