argv: support hidden flags

This commit adds support for hidden flags. The purpose of hidden flags
is for things that end users likely won't need unless they have a
configuration file that disables ripgrep's defaults. These flags will
provide a way to re-enable ripgrep's defaults.
This commit is contained in:
Andrew Gallant
2018-02-06 18:26:23 -05:00
parent 706323ad8f
commit 874f0b96a6
2 changed files with 25 additions and 0 deletions

View File

@@ -99,6 +99,9 @@ fn formatted_options() -> io::Result<String> {
let mut formatted = vec![];
for arg in args {
if arg.hidden {
continue;
}
// ripgrep only has two positional arguments, and probably will only
// ever have two positional arguments, so we just hardcode them into
// the template.