[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Common configuration of Debianish build etc. tools



I think this is a good idea.

Ian Jackson <ijackson@chiark.greenend.org.uk> writes:

> It shouldn't just be an environment variable because that clutters the
> environment unnecessarily.  I think it should probably be a config
> file in ~, overrideable with an environment variable.  (Or perhaps the
> config filename could be overrideable with an environment variable.)

The currently popular bikeshed color (with widespread support in multiple
languages) is to use the XDG Base Directory Specification, which defaults
to looking in ~/.config and honors XDG_CONFIG_HOME as an environment
variable to move those files elsewhere.  I personally much prefer this
because it reduces clutter in $HOME and also moves config files into a
separate directory (which one can then easily keep in version control)
from other crap that programs want to write in the home directory but that
I don't particularly care about, like cache files, .lesshst, .history,
.viminfo, and so forth.

All of the logic is implemented for you in Perl in File::BaseDir, in Rust
in the xdg crate, in Python in python3-xdg, and so forth.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: