4 ms·
Any particular reason why newer tools don't follow the well-established XDG standard for config files? Those folder structures probably already exist on end use
by ijustlovemath 3y ago
Any particular reason why newer tools don't follow the well-established XDG standard for config files? Those folder structures probably already exist on end user machines, and keep your home directory from getting cluttered with tens of config files
- burntsushi 3y agoFor ripgrep at least, you set an environment variable telling it where to look for a config file. You can put it anywhere, so you don't need to put it in $HOME. I didn't do XDG because this route seemed simpler, and XDG isn't something that is used everywhere.
- Hendrikto 3y ago> I didn't do XDG because this route seemed simpler Simpler how? This requires custom config, instead of following what I set system-wide. > and XDG isn't something that is used everywhere. Yeah, that‘s why it defines defaults to fall back on.
- burntsushi 3y agoIt's far simpler to implement. No, you don't understand. I'm not saying The XDG variables might not be defined. Give me a little credit here lol. I have more than a passing familiarity with XDG. I've implemented it before. I'm saying the XDG convention itself may not apply. For example, Windows. And its controversial whether to use them on macOS when I last looked into it. I don't see any significant problem with defining an environment variable. You likely already have dozens defined. I know I do. I'm not trying to convince you of anything. Someone asked why. This is why for ripgrep at least.
- ijustlovemath 3y agoCould ripgrep not simply add a check for the XDG environment variables and use those, if no rg environment variable is given? Of course if both are not available you would use the default.
- burntsushi 3y agoOf course. But now you've complicated how config files are found and it doesn't seem like an improvement big enough to justify it. Bottom line is that while ripgrep doesn't follow XDG, it also doesn't force you to litter your HOME directory. That's what most people care about in my experience. I would encourage you to search the ripgrep issue tracker for XDG. This has all been discussed.
- smaudet 3y agoThe issue is complexity - we could create some sort or 'standard tool' library that 'just works' on all platforms, but now building the tool and runtime bootstrapping the tool become more complex, and hence more likely to _break_. Really most people want it in their path and it just to work in as many scenarios as possible. Config almost shouldn't be the responsibility of the tool at all... (Options passed to the tool via env variables, perhaps)...
- smaudet 3y agoStandard should be - tool tells you where it's configured, how to change the config, and choose a 'standard' default config, such as XDG. Assuming you aren't doing weird things with paths, I can work around 'dumb lazy' developers releasing half-assed tools with symlinks/junctions, but I really don't want to spend a ton of time configuring your tool or fighting its presumptions.
- burntsushi 3y agoOh okay, I guess you've got it figured out. Now specify it in enough detail for others to implement it, get all stakeholders to agree and get everyone to implement it exactly to the spec. Good luck. You're already off to a rough start with XDG, since that isn't what is used on Windows. And it's unclear whether it ought to be used on macOS.
- xcdzvyn 3y agoSlight rant/aside but Firefox is bad for this. You can point it to a custom profile path (e.g. .config/mozilla) but ~/.mozilla/profile.ini MUST exist. Only that one file - you can move everything else.
- ijustlovemath 3y agoIn my mind, this is fine, as Firefox predates the standard by a long time. But newer tools specifically should know better.
- tedunangst 3y agoXDG isn't recognized as an authority outside of XDG.