summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-12-06 17:29:34 -0500
committerAndrew Gallant <jamslam@gmail.com>2016-12-06 17:29:34 -0500
commitd66812102b6184a0dd7d168a3afe2dbf209841cb (patch)
treeaabffcaadc714bbabe7a01a2cb8ec279db2a655a /src
parent86f8c3c8183a67ad3f4ced334b2d05373c76e985 (diff)
Fix leading hypen bug by updating clap.
Fixes #270
Diffstat (limited to 'src')
-rw-r--r--src/app.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/app.rs b/src/app.rs
index 937529f3..fe80a069 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1,6 +1,6 @@
use std::collections::HashMap;
-use clap::{App, AppSettings, Arg};
+use clap::{App, AppSettings, Arg, ArgSettings};
const ABOUT: &'static str = "
ripgrep (rg) recursively searches your current directory for a regex pattern.
@@ -74,6 +74,7 @@ fn app<F>(next_line_help: bool, doc: F) -> App<'static, 'static>
.arg(arg("path").multiple(true))
.arg(flag("regexp").short("e")
.takes_value(true).multiple(true).number_of_values(1)
+ .set(ArgSettings::AllowLeadingHyphen)
.value_name("pattern"))
.arg(flag("files")
// This should also conflict with `pattern`, but the first file