Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple profiles undocumented #141

Closed
rjc opened this issue Sep 26, 2023 · 2 comments
Closed

Support for multiple profiles undocumented #141

rjc opened this issue Sep 26, 2023 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@rjc
Copy link

rjc commented Sep 26, 2023

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.

@jlbribeiro
Copy link

@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 case RBW_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 ...

@doy doy added the documentation Improvements or additions to documentation label Apr 20, 2024
@doy
Copy link
Owner

doy commented Apr 20, 2024

fixed in 42c433b

@doy doy closed this as completed Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants