On Mon, Apr 29, 2019 at 12:14 PM Michael Kjörling <michael@kjorling.se> wrote:
On 28 Apr 2019 13:00 -0700, from bakul@bitblocks.com (Bakul Shah):
> b) a standardized plain text format

I'm not sure about that; different applications have very different
needs, and trying to shoehorn one into another would be ugly; quite
possibly even more ugly than just having different formats. Imagine
trying to write mail sorting recipies (think procmail) in a file with
the same format as that of one holding word processor settings or an
image metadata store. I guess that's half-way tolerable on Windows
because next to nobody edits the settings directly anyway, but on a
system where many such files are sometimes, or often, edited directly
by the user, it might well hinder more than it helps. I guess you
_could_ go with something like XML or JSON, but that's a bit like
saying "all cars should have an engine and a refillable fuel store",
in that it doesn't actually standardize anything _meaningful_ (in both
of those cases, the magic is in the schema, not the format). Lists of
examples not intended to be exhaustive.

The only thing that .profile and .Xdefaults share is a leading '.'. While the latter could be XML or JSON (almost, neither of those formats has conditional expressions and .Xdefaults is run through cpp), the former never could be XML or JSON in any sane universe.

So while some config stuff is stored in the dot files, its nature is somewhat different.

Also, to use git as an example. my repo has a .git/config in it. For work repos I put my work email and preferred spelling of my name. those go in repo/.git/config. But for everything else, I have some global settings in $HOME/.git/config. There are from time to time other reasons to tweak the settings of a repo and have it be local to that repo only.

It's a tricky problem...

Warner