Add configuration templates (resusable snippets)
- Dominant language
- Perl
- Stars
- 2.1k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
I discovered the `group` directive in the docs the other day, and while quite powerful, most of the things I thought it would let me do that I couldn't before are still not possible because there's no way to associate configuration with a group.
I suggest adding a `group_config` directive that can only be used at the top level of a config file, after which other config directives can appear until e.g. the next `volume` directive. It occurs to me that the "group" keyword could also be reused for this since it's currently ignored at the top level (I just tried it).
When the `group` directive is used, its associated configuration would be inherited by the vol/subvol/target currently being described, with the group's config overriding any options previously defined in the vol/subvol/target. This allows the user total control over how the configs are combined by carefully selecting where the `group` directives appear.
The only sticking point I can see is the issue that certain config directives aren't allowed in certain contexts. I strongly suspect that it would be better to issue an error when a group directive implies configuration inappropriate to the current context, but ignoring it would also be an option.
Contributor guide
No contributing guide indexed for this repository
Research direction
No files or tests are named. Start by locating the configuration parser and existing handling for group, volume, subvolume, and target directives; then resolve the proposed inheritance and invalid-context behavior. Done means the chosen group configuration syntax works at top level, applies with the stated precedence, and has coverage for relevant contexts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100