From 1f994018214d25753305f55fc1a1f5dbdbe1a5a6 Mon Sep 17 00:00:00 2001 From: Canop Date: Thu, 25 Jul 2024 07:22:42 +0200 Subject: [PATCH] document search_again --- CHANGELOG.md | 6 ++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/verb/internal.rs | 2 +- website/docs/conf_verbs.md | 5 +++-- website/docs/navigation.md | 6 +++++- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bba55663..7aa61191 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### next +#### Major Feature: :search_again +ctrl-s now triggers `:search_again` which either +- brings back the last used search pattern, when no filtering pattern is active +- does a "total search" if a filtering pattern is active and the search wasn't complete + ### v1.40.0 - 2024-07-16 #### Major Feature: preview transformers diff --git a/Cargo.lock b/Cargo.lock index 07304679..8df44323 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -210,7 +210,7 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "broot" -version = "1.40.0" +version = "1.40.1-dev" dependencies = [ "ansi_colours", "base64 0.21.7", diff --git a/Cargo.toml b/Cargo.toml index 8deaaa4a..d0ed3860 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "broot" -version = "1.40.0" +version = "1.40.1-dev" authors = ["dystroy "] repository = "https://github.com/Canop/broot" homepage = "https://dystroy.org/broot" diff --git a/src/verb/internal.rs b/src/verb/internal.rs index 580ae8c3..eef565e0 100644 --- a/src/verb/internal.rs +++ b/src/verb/internal.rs @@ -152,7 +152,7 @@ Internals! { toggle_tree: "toggle showing more than one level of the tree" true, toggle_trim_root: "toggle removing nodes at first level too" false, total_search: "search again but on all children" false, - search_again: "either put pack the search, or search deeper" false, + search_again: "either put back last search, or search deeper" false, trash: "move file to system trash" true, unstage: "remove selection from staging area" true, up_tree: "focus the parent of the current root" true, diff --git a/website/docs/conf_verbs.md b/website/docs/conf_verbs.md index c4f2c04b..69f944d1 100644 --- a/website/docs/conf_verbs.md +++ b/website/docs/conf_verbs.md @@ -428,7 +428,8 @@ invocation | default key | default shortcut | behavior / details :quit | ctrlq | q | quit broot :refresh | F5 | - | refresh the displayed tree and clears the directory sizes cache :root_down | - | - | move tree root down -:root_up | - | - | "move tree root up" +:root_up | - | - | move tree root up +:search_again | - | ctrls | either put back last search, or search deeper :select | - | - | select a path given as argument, if it's in the visible tree :select_first | - | - | select the first line :select_last | - | - | select the last line @@ -460,7 +461,7 @@ invocation | default key | default shortcut | behavior / details :toggle_staging_area | - | tsa | open/close the staging area panel :toggle_tree | - | - | toggle showing only one level of the tree (when not affected by sorting) :toggle_trim_root | - | - | toggle trimming of top level files in tree display -:total_search | - | ctrls | search again but on all children instead of stopping when the results look good enough +:total_search | - | - | search again but on all children instead of stopping when the results look good enough :trash | - | - | move file to system trash :unstage | - | - | remove selection from staging area :up_tree | - | - | focus the parent of the current root diff --git a/website/docs/navigation.md b/website/docs/navigation.md index d8b85484..24ad5911 100644 --- a/website/docs/navigation.md +++ b/website/docs/navigation.md @@ -78,10 +78,14 @@ If you want to know more about the exact pattern syntax, see [reference](../inpu When you search in broot in a very big directory on a slow disk, broot doesn't always look at all files. It stops when it found enough matches and then rates those matches. -If you think there might be a better match, hidden deeper, you may require a *total search*, which is a search which look at *all* files. This is done using the `:total_search` verb, which may be triggered with the CtrlS key combination (you may redefine it, see [configuration](../conf_file/#keyboard-key)). +If you think there might be a better match, hidden deeper, you may require a *total search*, which is a search which look at *all* files. This is done using the `:search_again` verb, which may be triggered with the CtrlS key combination (you may redefine it, see [configuration](../conf_file/#keyboard-key)). As for other searches, it's interrupted as soon as you type anything. +# Search again + +If no filtering is active, hit CtrlS to bring back the last used filtering pattern. + # Quitting broot Other than executing a command leaving broot, there are several ways to quit: