cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Transition to "sane" command line option treatment

From: Wei Weng <wweng_at_kencast.com>
Date: Tue, 03 Jun 2008 15:28:36 -0400

Daniel Stenberg wrote:
> Hey
>
> One of the not to good behaviors of curl is how many of the command line
> options work when being repeated: toggling on/off.
>
> We'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'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...
>
> I'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 - unless we can
> figure out a way to keep it for backwards compatibility when we
> introduce the new behavior.
>
> I'm willing to sacrifize some backwards compatibility to get this done,
> but I would of course like to hurt as few users as possible.
>
> I'm very interested to get ideas and feedback from you guys on how we
> can accomplish this!
>
> My first thoughts on how to do this, is simply to convert all the
> current options to _enable_ options and then introduce a new concept
> that negates the option. Like -v or --verbose to enable verbose, and
> --no-verbose to disable verbose.
>
> Any bright ideas?
>

Daniel:

Are you saying that if I want to disable a certain option, I need to
specify --no-OPTION_NAME explicitly to curl?

Thanks
Wei
Received on 2008-06-03