From f91b02bf095b613587f7db28f075595afde38cf5 Mon Sep 17 00:00:00 2001 From: Canop Date: Thu, 16 Jul 2020 21:02:22 +0200 Subject: version 0.19.0 --- CHANGELOG.md | 3 ++- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 2 +- src/display/displayable_tree.rs | 3 +-- src/preview/preview_state.rs | 7 +++++++ website/docs/img/201200716-binary.png | Bin 151829 -> 0 bytes website/docs/img/201200716-preview.png | Bin 68456 -> 0 bytes website/docs/img/20200716-binary.png | Bin 0 -> 151829 bytes website/docs/img/20200716-preview.png | Bin 0 -> 68456 bytes website/docs/img/20200716-search-log.png | Bin 0 -> 149809 bytes website/docs/index.md | 2 +- website/docs/panels.md | 4 ++-- website/docs/tricks.md | 8 ++++++++ 14 files changed, 24 insertions(+), 9 deletions(-) delete mode 100644 website/docs/img/201200716-binary.png delete mode 100644 website/docs/img/201200716-preview.png create mode 100644 website/docs/img/20200716-binary.png create mode 100644 website/docs/img/20200716-preview.png create mode 100644 website/docs/img/20200716-search-log.png diff --git a/CHANGELOG.md b/CHANGELOG.md index a9b745c..2c3c506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ -### next version + +### v0.19.0 - 2020-07-16 #### Major feature: the preview panel Hit ctrl-right when a file is selected and you get the preview. diff --git a/Cargo.lock b/Cargo.lock index 6d408e9..bc8fe44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -106,7 +106,7 @@ dependencies = [ [[package]] name = "broot" -version = "0.19.0-alpha" +version = "0.19.0" dependencies = [ "bet", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 284cebb..e1a854a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "broot" -version = "0.19.0-alpha" +version = "0.19.0" authors = ["dystroy "] repository = "https://github.com/Canop/broot" documentation = "https://dystroy.org/broot" diff --git a/README.md b/README.md index 9ea4d17..868950a 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ That's what makes it usable where the old `tree` command would produce pages of Hit ctrl when a file is selected and the preview panel appears. -![preview](website/docs/img/201200716-preview.png) +![preview](website/docs/img/20200716-preview.png) The preview panel stays synchronized with the selection in tree panels. diff --git a/src/display/displayable_tree.rs b/src/display/displayable_tree.rs index 57c80d0..cb569d1 100644 --- a/src/display/displayable_tree.rs +++ b/src/display/displayable_tree.rs @@ -7,7 +7,6 @@ use { GitStatusDisplay, LONG_SPACE, LONG_BRANCH, MatchedString, - PermWriter, }, crate::{ content_search::ContentMatch, @@ -344,7 +343,7 @@ impl<'s, 't> DisplayableTree<'s, 't> { /// write the whole tree on the given `W` pub fn write_on(&self, f: &mut W) -> Result<(), ProgramError> { #[cfg(unix)] - let perm_writer = PermWriter::for_tree(&self.skin, &self.tree); + let perm_writer = super::PermWriter::for_tree(&self.skin, &self.tree); let tree = self.tree; let total_size = tree.total_sum(); diff --git a/src/preview/preview_state.rs b/src/preview/preview_state.rs index 79eb009..3e25d86 100644 --- a/src/preview/preview_state.rs +++ b/src/preview/preview_state.rs @@ -175,6 +175,13 @@ impl AppState for PreviewState { screen: &mut Screen, ) -> Result { match internal_exec.internal { + Internal::back => { + if self.filtered_preview.is_some() { + self.on_pattern(InputPattern::none(), &cc.con) + } else { + Ok(AppStateCmdResult::PopState) + } + } Internal::line_down => { self.mut_preview().try_scroll(ScrollCommand::Lines(1)); Ok(AppStateCmdResult::Keep) diff --git a/website/docs/img/201200716-binary.png b/website/docs/img/201200716-binary.png deleted file mode 100644 index a0e4670..0000000 Binary files a/website/docs/img/201200716-binary.png and /dev/null differ diff --git a/website/docs/img/201200716-preview.png b/website/docs/img/201200716-preview.png deleted file mode 100644 index 0ec8860..0000000 Binary files a/website/docs/img/201200716-preview.png and /dev/null differ diff --git a/website/docs/img/20200716-binary.png b/website/docs/img/20200716-binary.png new file mode 100644 index 0000000..a0e4670 Binary files /dev/null and b/website/docs/img/20200716-binary.png differ diff --git a/website/docs/img/20200716-preview.png b/website/docs/img/20200716-preview.png new file mode 100644 index 0000000..0ec8860 Binary files /dev/null and b/website/docs/img/20200716-preview.png differ diff --git a/website/docs/img/20200716-search-log.png b/website/docs/img/20200716-search-log.png new file mode 100644 index 0000000..965b8c7 Binary files /dev/null and b/website/docs/img/20200716-search-log.png differ diff --git a/website/docs/index.md b/website/docs/index.md index 3f863eb..f95517c 100644 --- a/website/docs/index.md +++ b/website/docs/index.md @@ -22,7 +22,7 @@ That's what makes it usable where the old `tree` command would produce pages of Hit ctrl when a file is selected and the preview panel appears. -![preview](img/201200716-preview.png) +![preview](img/20200716-preview.png) The preview panel stays synchronized with the selection in tree panels. diff --git a/website/docs/panels.md b/website/docs/panels.md index 01fb3d1..9a84a70 100644 --- a/website/docs/panels.md +++ b/website/docs/panels.md @@ -19,14 +19,14 @@ The `:close_panel` closes the current panel and is bound to ctrl # The preview panel -![preview](img/201200716-preview.png) +![preview](img/20200716-preview.png) It's not immediately focused on creation, because most often you'll want to preview a few files and it's conveninient to stay in the tree to navigate. To focus it, for example to scroll it, do ctrl again. Files that can't be interpreted as text are shown as binary: -![binary](img/201200716-binary.png) +![binary](img/20200716-binary.png) # Copy, move between panels... or more diff --git a/website/docs/tricks.md b/website/docs/tricks.md index 24386b9..2dcf798 100644 --- a/website/docs/tricks.md +++ b/website/docs/tricks.md @@ -97,3 +97,11 @@ We can also select the desired file with arrow keys at this point. When you grasped the basic logic of [combined filters](../input/#combining-filtering-patterns), navigation is incredibly efficient. + +## Use composite searches in preview + +You can apply composition and negation to searches in the preview panel which is convenient when filtering, for example, a log file. + +In this example I show lines containing "youtube" but not "txt" nor " 0 ms". + +![search log](img/20200716-search-log.png) -- cgit v1.2.3