Giving suggestion to use `--fixed-strings` in case user passes invalid metacharacters as a regex.
This commit is contained in:
Pramod Bisht 2018-02-18 22:20:53 +05:30 committed by David Peter
parent ad8256c217
commit 7e8c2248d0
1 changed files with 7 additions and 1 deletions

View File

@ -182,6 +182,12 @@ fn main() {
.build()
{
Ok(re) => walk::scan(&dir_vec, Arc::new(re), Arc::new(config)),
Err(err) => error(err.description()),
Err(err) => error(
format!(
"{}\nHint: You can use the '--fixed-strings' option to search for a \
literal string instead of a regular expression",
err.description()
).as_str(),
),
}
}