From 4428bf586d2fe3d0d705e23a7f62136d05e44054 Mon Sep 17 00:00:00 2001 From: Artiom Basenko Date: Fri, 17 Aug 2018 13:24:45 +0300 Subject: [PATCH] pt: add page (#2246) --- pages/common/pt.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/pt.md diff --git a/pages/common/pt.md b/pages/common/pt.md new file mode 100644 index 0000000000..0fa1510891 --- /dev/null +++ b/pages/common/pt.md @@ -0,0 +1,24 @@ +# pt + +> Platinum Searcher. +> A code search tool similar to `ag`. + +- Find files containing "foo" and print the files with highlighted matches: + +`pt {{foo}}` + +- Find files containing "foo" and display count of matches in each file: + +`pt -c {{foo}}` + +- Find files containing "foo" as a whole word and ignore its case: + +`pt -wi {{foo}}` + +- Find "foo" in files with a given extension using a regular expression: + +`pt -G='{{\.bar$}}' {{foo}}` + +- Find files whose contents match the regular expression, up to 2 folders deep: + +`pt --depth={{2}} -e '{{^ba[rz]*$}}'`