[ditz-talk] [PATCH] Better issue_dir possibility order

Ohad Lutzky ohad at lutzky.net
Mon Nov 10 01:57:24 EST 2008

On Mon, Nov 10, 2008 at 7:28 AM, William Morgan
<wmorgan-ditz at masanjin.net> wrote:
> Reformatted excerpts from Ohad Lutzky's message of 2008-11-08:
>> Actually, I think the solution in the patch makes more sense, unless
>> you want to integrate trollop with your settings file. (That, too,
>> could make sense...)
> Well the solution in the patch would mean that if you did a --help,
> there would be no default listed for --issue-dir, which isn't right.
> I'm proposing that Trollop provide a way of telling whether --issue-dir
> has been provided on the commandline, and if so, use it, and otherwise,
> use the config file value, and if that's not there, use the Trollop
> default.
> Now that I've written that sentence, I realize that the best solution
> might be to just untangle this whole mess: have the configuration
> filenames (.ditz-config and .ditz-plugins) be fixed, and not changeable
> by Trollop. Then those would be read first, and whatever settings were
> inside would form the basis for Trollop's defaults.
> In that world, doing --help would be really informative: it would tell
> you exactly what values were going to be used unless you overrode them
> on the commandline.

I like the way you're going with this, but here's a though: Why not
have a default "--config-file" option which gets parsed first
(regardless of any other trollop configuration the developer has)?
That way you could still load defaults from somewhere else.

Man is the only animal that laughs and weeps, for he is the only
animal that is struck with the difference between what things are and
what they ought to be.
 - William Hazlitt

Ohad Lutzky

More information about the ditz-talk mailing list