Using Directories as Configuration Fomats - Programming On Unix

Users browsing this thread: 1 Guest(s)
zge
Long time nixers
(11-09-2019, 10:53 PM)budRich Wrote: Good luck sorting out the dotfiles standards on linux. Many projects doesn't even respect XDG_CONFIG_HOME.

Oh, I'm not even trying, but on that note, I was shown this tools a while ago, that manipulates system calls, to redirect read-write requests from ~/.something to ~/.config/something

(11-09-2019, 10:53 PM)budRich Wrote: One disadvantage i see in your system, is comments.

I thought about this one, and there are two ways I could see it being solved. Either one takes the more complex path towards messing with extensions, and if "this/that/opt" is a key, then "this/that/opt.cmt" is the corresponding comment file, that would be respected by a editor, or oneself if one prefers to edit it manually. Or to avoid extensions, one could just choose "this/that/.opt", saying all hidden files are comments, regardless of their name.

(11-09-2019, 10:53 PM)budRich Wrote: Another is getting an overlook of the values, since one would need to read the files to see the values (if they aren't boolean).

Code:
find . -type f | xargs head

;^)

But you're right, that's why I suggested having explicit programs, that could either be something like sysctl or a more interactive tool like tig, aptitude or ranger. I'm planning to make one for emacs, to see how it could work.

(12-09-2019, 02:07 AM)Halfwit Wrote: I've taken to using mostly the ndb file format from plan9 for configurations in programs I've written, which have a very nice feature for includes. Mostly I've been well served by them

Did you implement it yourself, or is there some library for this?


Messages In This Thread
RE: Using Directories as Configuration Fomats - by zge - 12-09-2019, 03:54 AM