harthur/nomnom — Issue #14: A way to load defaults from a dotfile
Author: peterbraden
Created: 2011-11-29 19:38:36+00:00
State: open

I'm not sure whether this would fall under the scope of this library, but it would be super sweet to have a way to load args from a dotfile if they aren't specified in the args.

Something like this maybe:

opts = require('nomnom')
.dotfile('~/.myprogram')
.option('foo', {dotfileDefault: true})

would default foo to whatever was in dotfile.foo (probably the dotfile is json) ie:

$> cat ~/.myprogram
{"foo": "bar"}

Or something similar, but you get the gist...