Repository: sharkdp/fd (language: rust)

Issue:
Suggest --fixed-strings on invalid regexps
Inspired by https://github.com/BurntSushi/ripgrep/issues/709


Discussion / hints:
@sharkdp Can I take this one?
Sure! Let me know if you need any help. 

Fix patch:
diff --git a/src/main.rs b/src/main.rs
index bff176633..fc03583b9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -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(),
+        ),
     }
 }


Test patch: