Support for multiple profiles undocumented
rjc opened this issue · comments
Hello,
I've noticed that support for multiple profiles (PR #93) has been merged in commit d4453cb44a10f9bb558fd2a5561cc5223ba36a23 but how to use it isn't actually documented anywhere, i.e. not even mentioned in the README
.
Even the commit messages itself isn't clear whether RBW_PROFILE
environment variable is a path in the sense of a directory containing config.json
, or whether it is simply a file name, etc. It also isn't clear whether this should be an absolute or relative path.
The way I'd see it is like this, for:
$ RBW_PROFILE=foo rbw list
I'd search for a file called foo.json
in:
$HOME/Library/Application Support/rbw
on macOS, or:
$HOME/.config/rbw
on other *nix OSes.
@rjc Thank you for mentioning that PR, I was just installing rbw
and this came useful!
I'm not fluent in Rust, but from a cursory read, what changes is whether it should use
<config_base_path>/rbw/config.json
(default in the caseRBW_PROFILE
is undefined)<config_base_path>/rbw-${RBW_PROFILE}/config.json
(<config_base_path>
being defined in directories::ProjectDirs.config_dir()
depending on the platform)
In my case (Linux):
RBW_PROFILE=work rbw config show
... $XDG_CONFIG_HOME/rbw-work/config.json contents ...
fixed in 42c433b