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

structured/sectioned .driverc configuration #813

Merged
merged 1 commit into from
Dec 18, 2016
Merged

Conversation

odeke-em
Copy link
Owner

Fixes #778.

Now allows you to restructure your .driverc separating
commands into sections and having different clauses.

Please note:

id=true # Will be applied globally unless overwritten in a command

[global]
depth=10 # The depth to use if not defined

[pull/list]
depth=2 # The depth to be used for pull or list

[push]
verbose=true # verbose is only true for push

[list]
long=true # Allow long output for list

And see the tests in src/rc_test.go that lock in the promised behavior.

Fixes #778.

Now allows you to restructure your .driverc separating
commands into sections and having different clauses.

Please note:
* You can put multiple commands in the same
section by using separator "/". See the rules at
https://github.com/odeke-em/namespace/blob/0ab79ba44f1328b1ec75ea985ad5c338ba3d56a6/ns.go#L3-L14

* Overwriting of command rules is
command_section > global
and
commandX_higher_line > commandX_lower_line
where lines are natural numbers that are ascending

* Exhibits:
This is a sample of a .driverc that I've just defined that has flexible
behavior in different sections.

```
id=true # Will be applied globally unless overwritten in a command

[global]
depth=10 # The depth to use if not defined

[pull/list]
depth=2 # The depth to be used for pull or list

[push]
verbose=true # verbose is only true for push

[list]
long=true # Allow long output for list
```

And see the tests in src/rc_test.go that lock in the promised behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant