Add default path for user configuration #66

Merged
witten merged 1 commits from :add_user_config into master 2018-06-17 21:26:36 +00:00
Collaborator

It would be even better to read out XDG_CONFIG_HOME and use that, but this would either introduce a dependency on python-xdg or add some more code (reading out environment variable return it or default value).

What do you think about using XDG_CONFIG_HOME instead?

See https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

It would be even better to read out `XDG_CONFIG_HOME` and use that, but this would either introduce a dependency on `python-xdg` or add some more code (reading out environment variable return it or default value). What do you think about using `XDG_CONFIG_HOME` instead? See https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Owner

This seems like a reasonable place to start. I don't have a problem reading an environment variable, and python-xdg looks pretty tiny without any major dependencies of its own. Do you have a sense of how commonly XDG_CONFIG_HOME is used, either on various Linux distros or by users?

I'll merge this PR for now, but feel free to follow up with a ticket or PR for the XDG support.

This seems like a reasonable place to start. I don't have a problem reading an environment variable, and `python-xdg` looks pretty tiny without any major dependencies of its own. Do you have a sense of how commonly `XDG_CONFIG_HOME` is used, either on various Linux distros or by users? I'll merge this PR for now, but feel free to follow up with a ticket or PR for the `XDG` support.
witten closed this pull request 2018-06-17 21:26:36 +00:00
Owner

This has just been released as part of borgmatic 1.2.0!

This has just been released as part of borgmatic 1.2.0!
Author
Collaborator

Great!

Correctly implementing https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html requires some more effort than only reading the environement variable and providing a default, therefore I will likey follow up on that by a another pull request soon.

Not sure how commonly XDG_CONFIG_HOME is used, most people will just leave it at default, i.e. unset. It's certainly a good thing to support.

Great! Correctly implementing https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html requires some more effort than only reading the environement variable and providing a default, therefore I will likey follow up on that by a another pull request soon. Not sure how commonly `XDG_CONFIG_HOME` is used, most people will just leave it at default, i.e. unset. It's certainly a good thing to support.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#66
No description provided.