simonw / datasette-ripgrep

Web interface for searching your code using ripgrep, built as a Datasette plugin
https://ripgrep.datasette.io
Apache License 2.0
72 stars 1 forks source link

Provide a way of running -F (literal) searches #8

Closed simonw closed 3 years ago

simonw commented 3 years ago

Suggested here: https://news.ycombinator.com/item?id=25237299

https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md says:

(Note: We escape the ( here because ( has special significance inside regular expressions. You could also use rg -F 'fn write(' to achieve the same thing, where -F interprets your pattern as a literal string instead of a regular expression.)

simonw commented 3 years ago

Demo: https://ripgrep.datasette.io/-/ripgrep?pattern=.plugin_config%28&literal=on