From: Andreas G. <an...@gr...> - 2020-11-29 07:39:57
|
Hello, I know there’s been interest in adding XDG_CONFIG_HOME support for the config file locations of mbsync from a previous thread on this list: https://sourceforge.net/p/isync/mailman/message/37004353/ <https://sourceforge.net/p/isync/mailman/message/37004353/> and from this reasonably well-received feature request: https://sourceforge.net/p/isync/feature-requests/14/ <https://sourceforge.net/p/isync/feature-requests/14/> Attached to this message is a patch implementing one half of the requested feature. The patch changes the way that mbsync looks for a config file in the following way: 1.) it expands XDG_CONFIG_HOME, if set, and otherwise defaults to $HOME/.config as per the specification 2.) it attempts to open the config file at location $XDG_CONFIG_HOME/mbsync/config 3.) if that failed, it will fall back to $HOME/.mbsyncrc I should note this approach still falls short of the specification in that the directories in $XDG_CONFIG_DIRS are not considered. A documentation change is included as well. Let me know if you want any changes to this patch, I’ll happily go through a couple of iterations. I think it’s important to get this right :) If this change is welcome, I can look into using XDG_DATA_HOME for ~/.local/share/mbsync as well, as requested in the original feature request. Thanks, Andreas |