summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-07-02 15:38:50 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-07-03 12:54:14 +1000
commit4d734d594a3adb225fd592e6649c3e32b292a88d (patch)
tree7030b6d19c46e859978fb3fbc99a1602a54363e2 /docs
parentb625eb5323e8842e7a5e12463384411a530f067f (diff)
Add filtering docs
Diffstat (limited to 'docs')
-rw-r--r--docs/README.md3
-rw-r--r--docs/Searching.md21
2 files changed, 23 insertions, 1 deletions
diff --git a/docs/README.md b/docs/README.md
index 4f58a2a56..c0c8191d2 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,7 +1,8 @@
-# Documentation Overview
+# Documentation Overview
* [Configuration](./Config.md).
* [Custom Commands](./Custom_Command_Keybindings.md)
* [Custom Pagers](./Custom_Pagers.md)
* [Keybindings](./keybindings)
* [Undo/Redo](./Undoing.md)
+* [Searching/Filtering](./Searching.md)
diff --git a/docs/Searching.md b/docs/Searching.md
new file mode 100644
index 000000000..589831c55
--- /dev/null
+++ b/docs/Searching.md
@@ -0,0 +1,21 @@
+# Searching/Filtering
+
+## View searching/filtering
+
+Depending on the currently focused view, hitting '/' will bring up a filter or search prompt. When filtering, the contents of the view will be filtered down to only those lines which match the query string. When searching, the contents of the view are not filtered, but matching lines are highlighted and you can iterate through matches with `n`/`N`.
+
+We intend to support filtering for the files view soon, but at the moment it uses searching. We intend to continue using search for the commits view because you typically care about the commits that come before/after a matching commit.
+
+If you would like both filtering and searching to be enabled on a given view, please raise an issue for this.
+
+## Filtering files by status
+
+You can filter the files view to only show staged/unstaged files by pressing `<c-b>` in the files view.
+
+## Filtering commits by file path
+
+You can filter the commits view to only show commits which contain changes to a given file path.
+
+You can do this in a couple of ways:
+1) Start lazygit with the -f flag e.g. `lazygit -f my/path`
+2) From within lazygit, press `<c-s>` and then enter the path of the file you want to filter by