Closed joshbode closed 1 year ago
Never mind - I have completely missed the --store_name
option which does exactly what I'm asking for :)
Also, I looked at the directories
library and state_dir
is Option<PathBuf>
(not defined on Windows or macOS) so it wouldn't be a good choice.
Currently,
fre
stores its default store (fre.json
) in${XDG_DATA_HOME}/fre
(usually resolving to~/.local/share/fre/fre.json
).However, the XDG Base Directory Specification suggests:
Would it make sense to use
${XDG_STATE_HOME}/fre
instead?The reason I'm considering this question is that currently the
--store
option tofre
specifies a path to an alternate store. My initial assumption when trying this was that just a name was required, and the storage location would be along-side the default store (e.g.--store=foo
would resolve to~/.local/share/fre/foo.json
, rather than a file calledfoo
in the current directory), so another possible improvement might be that if the value provided to--store
is not an absolute path, it is assumed that the storage location should be in the same directory as the default store (wherever that is most appropriate) with--store=fre
being synonymous with the default store.I'm happy to make a PR if either of these (standard location or "named" stores) would be useful.