wpm icon indicating copy to clipboard operation
wpm copied to clipboard

[WIP] Change default location for config files to platform defined config folder (Close #42)

Open cjbassi opened this issue 6 years ago • 2 comments

This change makes wpm load and store config files to ~/.config/wpm by default, specifically the wpm.csv and wpmrc files. It also removes the current functionality of loading config files from the home directory, but let me know if I should readd that functionality as a fallback if the ~/.config/wpm/* files don't exist since this would be a breaking change otherwise.

cjbassi avatar Jan 11 '19 03:01 cjbassi

The PR itself is fair enough, but does indeed break a lot for existing, casual users (myself included). If I'd merge this, then it would not read my current settings or stats.

I think you need an upgrade strategy in the PR, where you copy the files over. Also, make sure .config exists. I am not too deep into the XDG specs, but if you can help me out understanding how this is useful (and provide an automatic switchover functionality) then I'd merge this PR.

cslarsen avatar Jan 28 '19 05:01 cslarsen

Yah, breaking changes should definitely be avoided. I think the best solution would be to readd support for the currently used config file paths in this PR and default to that if the ~/.config/wpm/* files don't exist. So we're just creating a hierarchical lookup for the config file paths, which is a pretty standard cli app feature actually.

Also, the OSX standardization would need to be added to this PR, as mentioned in #42.

cjbassi avatar Jan 28 '19 06:01 cjbassi