summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 936e4965..e4f4b4f3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -118,15 +118,23 @@ fn run(args: Args) -> Result<u64> {
}
workq
};
+ let mut paths_searched: u64 = 0;
for p in paths {
if p == Path::new("-") {
- workq.push(Work::Stdin)
+ paths_searched += 1;
+ workq.push(Work::Stdin);
} else {
for ent in try!(args.walker(p)) {
+ paths_searched += 1;
workq.push(Work::File(ent));
}
}
}
+ if !paths.is_empty() && paths_searched == 0 {
+ eprintln!("No files were searched, which means ripgrep probably \
+ applied a filter you didn't expect. \
+ Try running again with --debug.");
+ }
for _ in 0..workers.len() {
workq.push(Work::Quit);
}