Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit refactors how we define flags. In theory, this commit should not result in any behavioral changes (other than perhaps more consistent rules for flag overrides). There are two important changes: Firstly, each flag (or tightly coupled group of flags) is defined in its own function. This function includes the documentation for that flag. This improves the locality for each flag; everything you need to know about it is self-contained in one small region of code. Secondly, each flag is defined in terms of a very small ripgrep-specific layer above clap. This permits us to have a set of structured arguments independent of clap. The intention here is that we can use this indirection to generate other documentation such as man pages. This commit lays the ground work for modifying our use of clap in principled way such that flags can be specified multiple times without conflict. This in turn will help us implement support for persistent configuration.
- Loading branch information