summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2023-02-10 15:30:45 +0100
committerCanop <cano.petrole@gmail.com>2023-02-10 15:30:45 +0100
commitc32792311aebea27af71504106c6fac6da1967c4 (patch)
tree27182bf13b54a2a20ca177a52a90e74bd18813ba
parentde62b9fffd975fb9b1a6d4c6b8741b054fee1eaf (diff)
website: example of search by extension & content
-rw-r--r--website/docs/img/20230210-extension-content.pngbin0 -> 61928 bytes
-rw-r--r--website/docs/input.md25
-rw-r--r--website/docs/navigation.md2
3 files changed, 19 insertions, 8 deletions
diff --git a/website/docs/img/20230210-extension-content.png b/website/docs/img/20230210-extension-content.png
new file mode 100644
index 0000000..5a91e8d
--- /dev/null
+++ b/website/docs/img/20230210-extension-content.png
Binary files differ
diff --git a/website/docs/input.md b/website/docs/input.md
index b609e48..220f59f 100644
--- a/website/docs/input.md
+++ b/website/docs/input.md
@@ -125,19 +125,20 @@ Verbs are detailed in the [Verbs & Commands](verbs.md) chapter.
# Examples
-## A Fuzzy Path search:
+## Fuzzy Path search
`re`
![fuzzy](img/20210511-fuzzy-re.png)
-## A regular expression based search:
+## Regular expression based search
`/R`
![fuzzy](img/20210511-regex.png)
-## A search followed by a command without arguments:
+
+## Search followed by a command without arguments
`re rm` (which is equivalent to `re:rm`)
@@ -145,13 +146,13 @@ This is very natural: You use the search to select your element and you don't ne
![fuzzy](img/20200526-input-fuzzy-rm.png)
-## A search followed by a command taking an argument:
+## Search followed by a command taking an argument
`re mv ../regex.rs`
![fuzzy](img/20200526-input-fuzzy-mv.png)
-## A full text search
+## Full text search
In this case with an escaped space:
@@ -159,11 +160,21 @@ In this case with an escaped space:
![content search](img/20210511-twop.png)
-## A regular expression based full text search
+## Regular expression based full text search
![content regex search](img/20201002-cr-search.png)
-## A complex composite search
+## Search by name/extension and content
+
+Here's searching files whose name ends in "toml" and containing "crokey":
+
+`/\.toml$/&c/crokey`
+
+![extension & content](img/20230210-extension-content.png)
+
+In practice, you won't usually bother with the `\.`. And if you want to cover `"TOML"` too, you'll add a `i`: `/toml/i&c/crokey`.
+
+## Complex composite search
Here we search for `"carg"` both in file names and file contents, and we exclude `"lock"` files:
diff --git a/website/docs/navigation.md b/website/docs/navigation.md
index 5734f89..5ebfafb 100644
--- a/website/docs/navigation.md
+++ b/website/docs/navigation.md
@@ -72,7 +72,7 @@ If you're looking for a file whose name you don't remember exactly ("rust_test"
# More about searches
-If you want to know more about the exact pattern syntax, see [reference](../input/#the-filtering-pattern).
+If you want to know more about the exact pattern syntax, see [reference](../input/#the-filtering-pattern) and [examples](../input/#examples).
# Total Search