sqitch icon indicating copy to clipboard operation
sqitch copied to clipboard

XDG Base Directory support

Open purpleKarrot opened this issue 5 years ago • 5 comments

Instead of (or in addition to) ~/.sqitch/, search the user configuration in $XDG_CONFIG_HOME/sqitch/, ~/.config/sqitch/.

https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html

purpleKarrot avatar Jun 02 '19 21:06 purpleKarrot

It's not just the Sqitch config file, but also configuration files used by each engine.

theory avatar Jun 02 '19 21:06 theory

Correct. It is about the whole directory. That's why I put a / at the end.

purpleKarrot avatar Jun 03 '19 08:06 purpleKarrot

Well, we could easily teach to favor $XDG_CONFIG_HOME over $HOME when looking for files, but I don't know whether and how well each engine supports that environment variable when reading its config files. We'd need to do an inventory, I expect, and probably send feature requests similar to this one to the engines that don't pay attention to $XDG_CONFIG_HOME. Snowflake comes to mind; it reads $WORKSPACE and $HOME.

theory avatar Jun 03 '19 20:06 theory

Please implement, respecting users' preferences is the right thing to do.

lhanson avatar Sep 05 '19 02:09 lhanson

Not if the database clients (psql, snowsql, sqlite3, etc. don’t support it.

theory avatar Sep 05 '19 14:09 theory