-
Notifications
You must be signed in to change notification settings - Fork 164
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
User-level config files in $HOME directory. #213
Comments
Please don’t forget about On other note, I think we should actually merge configs like Git does. Take global first, merge with local and use the result. It is not that hard actually, especially since we have a real programming language to use. |
@ming13 The integration tests are actually testing properly merged config file like you described, though for the ignore files it is using the local and fall backing for the shared ones, so no merge tests for ignores. Also, there is a small challenge on this approach, as user could run mainframer at any folder, it might happen to run in the wrong folder. |
Merging is not that easy tho, specifically because we don't have a format to unignore stuff like git does:
|
Closes #225, part of #213 This change switches config format that used to be some sort of `.ini` file to [YAML](http://yaml.org/spec/1.2/spec.html#id2760395) as discussed in #225 Example of `.mainframer/config.yml`: ```yml remote: host: "computer1" user: "user1" # Not implemented yet. port: 1234 # Not implemented yet. push: compression: 5 pull: compression: 2 ``` --- Code is also getting ready for config files merging #213. - `IntermediateConfig` represents one of possibly multiple config files, thus everything is optional. - `Config` represents finalized config, thus only actually optional fields are optional Note that `remote.user` and `remote.port` are not implemented yet (we continue to rely on `~/.ssh/config` read by `ssh` for now
As we're making Mainframer OS-wide tool #185, we need to add support for configuration files stored in user-home
$HOME
directory that will be used in case when work-dir doesn't have them.Purpose of this feature is to enable use cases like:
When you have project(s) you don't want to configure specifically and just let Mainframer do its work with 0-setup on project level.
Current plan:
~/.mainframer
folder as user-home level folder for config files (config
,ignore
,localignore
,remoteignore
)There is an existing PR #189 that was targeting 2.x version of Mainframer and not fully compatible with 3.x rewritten in Rust, so we'll merge parts of #189 (specifically integration tests) and add another PR to implement this functionality in Mainframer.
@ming13 do you agree with details like
~/.mainframer
as folder name and non-merge behavior?The text was updated successfully, but these errors were encountered: