[spambayes-dev] proposal for more uniform option setting from thecommand line

Kenny Pitt kennypitt at hotmail.com
Wed Nov 12 13:43:06 EST 2003

Skip Montanaro wrote:
> How about instead of only allowing specific options to be overridden
> on the command line we use a consistent syntax for overriding *any*
> option from the command line?  For example, to set the ["Storage",
> "persistent_storage_file"] we could use something like
>     -o Storage:persistent_storage_file:~/.hammiedb
> or
>     --option=Storage:persistent_storage_file:~/.hammiedb

This sounds useful for those doing testing with various options, and I'm
all for it from that standpoint.  However, I'm not sure how useful it
would be for the average user.

> We would then deprecate any command line args used to twiddle options
> using any other syntax.  Use of those args would trigger a message to
> stderr like: 
>     Deprecated form: "-d ~/hammie.db" found.
>     Use "-o Storage:persistent_storage_file:~/hammie.db" instead.

I don't know if it's good to go that far.  The new syntax is rather
cumbersome, especially if I'm typing the command manually.  Also, some
command line flags can set several related option values to the correct
combination (e.g. set both the database filename and type with one
flag), and the new syntax would require knowing the correct combination
and providing all the correct values.

> This could be extended further.  Should the user give an incomplete
> -o flag such as "-o Storage" or "-o Storage:spam_cache", help about
> that section or variable could be emitted:

What about options that have no effect on the application being run?
Would it be possible to detect them and show help in that case also?
How would we present a list of useful options to the end user without
overwhelming them with rarely changed settings and gory internal

Kenny Pitt

More information about the spambayes-dev mailing list