Skip to content

Commit

Permalink
document search_again
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop committed Jul 25, 2024
1 parent 85b4400 commit 1f99401
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
<a name="v1.40.0"></a>
#### Major Feature: preview transformers
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "broot"
version = "1.40.0"
version = "1.40.1-dev"
authors = ["dystroy <denys.seguret@gmail.com>"]
repository = "https://github.com/Canop/broot"
homepage = "https://dystroy.org/broot"
Expand Down
2 changes: 1 addition & 1 deletion src/verb/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions website/docs/conf_verbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ invocation | default key | default shortcut | behavior / details
:quit | <kbd>ctrl</kbd><kbd>q</kbd> | q | quit broot
:refresh | <kbd>F5</kbd> | - | 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 | - | <kbd>ctrl</kbd><kbd>s</kbd> | 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
Expand Down Expand Up @@ -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 | - | <kbd>ctrl</kbd><kbd>s</kbd> | 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 | <kbd>-</kbd> | - | remove selection from staging area
:up_tree | - | - | focus the parent of the current root
Expand Down
6 changes: 5 additions & 1 deletion website/docs/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <kbd>Ctrl</kbd><kbd>S</kbd> 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 <kbd>Ctrl</kbd><kbd>S</kbd> 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 <kbd>Ctrl</kbd><kbd>S</kbd> to bring back the last used filtering pattern.

# Quitting broot

Other than executing a command leaving broot, there are several ways to quit:
Expand Down

0 comments on commit 1f99401

Please sign in to comment.