From 6d109e5a664a88550f5be9234b4a42b120173342 Mon Sep 17 00:00:00 2001 From: kalebo Date: Wed, 2 Nov 2016 21:42:23 -0600 Subject: [PATCH] rg: add page (#1146) --- pages/common/rg.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pages/common/rg.md diff --git a/pages/common/rg.md b/pages/common/rg.md new file mode 100644 index 000000000..20c2d26ff --- /dev/null +++ b/pages/common/rg.md @@ -0,0 +1,23 @@ +# ripgrep + +> A fast command-line search tool. + +- Recursively search the current directory for a regex pattern: + +`rg {{pattern}}` + +- Search for pattern including all .gitignored and hidden files: + +`rg -uu {{pattern}}` + +- Search for a pattern only in a certain filetype (e.g., html, css, etc.): + +`rg -t {{filetype}} {{pattern}}` + +- Search for a pattern only in a subset of directories: + +`rg {{pattern}} {{set_of_subdirs}}` + +- Search for a pattern in files matching a glob (e.g., `README.*`): + +`rg {{pattern}} -g {{glob}}`