-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
feature request: config file fallback paths #71
Comments
Hey! Short background about the current implementation: The reason why there is no default repository config is that one may have multiple independent repository configuration for different purposes. I, for example, have one for personal projects on Github, one for work, and one for some random projects I have laying around. This could be done in a single file with multiple But I see the appeal of having a single file containing all repo configuration, thank you for bringing up that use case. Thoughts about the implemenatation:
I think the smallest change that would fit your use case would be the
The fallback is currently implemented as a simple default value for git-repo-manager/src/grm/cmd.rs Line 176 in 3a433a1
The configuration file itself is read here: git-repo-manager/src/grm/main.rs Line 27 in 3a433a1
Changing the command line parameter to an |
I would like to call
grm repos status
without needing to specify-c <path>
every time I want to use a config file that lives outside the current directory.This could be done by reading an environment variable when
-c
is omitted. Something like$GRM_CONFIG_FILE
, maybe. It would also be great ifgrm
looked in a standard default location like$XDG_CONFIG_HOME/grm/config.toml
.These would, of course, be overridden if
-c <path>
was specified. Not sure what the behavior should be if the current directory has aconfig.toml
, but that's a pretty generic filename so perhaps it should be ignored.The text was updated successfully, but these errors were encountered: