Skip to content

Commit

Permalink
version bump -> 0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop committed Feb 18, 2019
1 parent 3b18189 commit edb1a79
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 51 deletions.
30 changes: 17 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
<a name="v0.6.2"></a>
### v0.6.2 - 2019-02-18
- all colors can be configured in conf.toml

<a name="v0.6.1"></a>
## v0.6.1 - 2019-02-14
### v0.6.1 - 2019-02-14
- complete verbs handling in help screen
- faster regex search
- fix missing version in `broot -V`

<a name="v0.6.0"></a>
## v0.6.0 - 2019-02-12
### Major changes
### v0.6.0 - 2019-02-12
##### Major changes
- broot now installs the **br** shell function itself *(for bash and zsh, help welcome for other shells)*
- new verb `:toggle_trim_root` allows to keep all root children
- verbs can refer to `{directory}` which is the parent dir when a simple file is selected
- user configured verbs can be launched from parent shell too (like is done for `cd {directory}`)
### Minor changes
##### Minor changes
- allow page up and page down on help screen
- fuzzy pattern: increase score of match starting after word separator
- better handle errors on a few cases of non suitable root (like passing an invalid path)
- clearer status error on `:cd`. Mentions `<alt><enter>` in help
- add a scrollbar on help screen

<a name="v0.5.2"></a>
## v0.5.2 - 2019-02-04
### v0.5.2 - 2019-02-04
- More responsive on slow disks
- fix a link to documentation in autogenerated conf

<a name="v0.5.1"></a>
## v0.5.1 - 2019-02-03
### v0.5.1 - 2019-02-03
- alt-enter now executes `:cd`

<a name="v0.5.0"></a>
## v0.5.0 - 2019-01-30
### v0.5.0 - 2019-01-30
- patterns can be regexes (add a slash before or after the pattern)
- configuration parsing more robust
- no need to put all verbs in config: builtins are accessible even without being in config
Expand All @@ -39,31 +43,31 @@
- more precise display of file/dir sizes

<a name="0.4.7"></a>
## 0.4.7 - 2019-01-21
### 0.4.7 - 2019-01-21
- fix some cases of panic on broot quitting
- new `--cmd` program argument allows passing a sequence of commands to be immediately executed (see [updated documentation](https://github.com/Canop/broot/blob/master/documentation.md#passing-commands-as-program-argument))
- better handling of symlink (display type of target, show invalid links, allow verbs on target)
- compiled with rustc 1.32 which brings about 4% improvements in perfs compared to 1.31

<a name="v0.4.6"></a>
## v0.4.6 - 2019-01-12
### v0.4.6 - 2019-01-12
- fix configured verbs not correctly handling paths with spaces
- fix `:q` not instantly quitting broot when computing size
- hit enter on tree root correctly quits broot

<a name="v0.4.5"></a>
## v0.4.5 - 2019-01-11
### v0.4.5 - 2019-01-11
- Faster search, mainly

<a name="v0.4.3"></a>
## v0.4.3 - 2019-01-08
### v0.4.3 - 2019-01-08
- Faster search and directory size computation.

<a name="v0.4.2"></a>
## v0.4.2 - 2019-01-07
### v0.4.2 - 2019-01-07
- more complete search if time allows
- search pattern kept after verb execution

<a name="v0.4.1"></a>
## v0.4.1 - 2019-01-07
### v0.4.1 - 2019-01-07
- first public release
18 changes: 9 additions & 9 deletions 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 = "0.6.1"
version = "0.6.2"
authors = ["dystroy <[email protected]>"]
repository = "https://github.com/Canop/broot"
description = "Fuzzy Search + tree + cd"
Expand Down
3 changes: 1 addition & 2 deletions src/help_states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use crate::commands::{Action, Command};
use crate::conf::Conf;
use crate::screen_text::{Text, TextTable};
use crate::screens::{Screen, ScreenArea};
use crate::skin::Skin;
use crate::status::Status;
use crate::task_sync::TaskLifetime;
use crate::verbs::{PrefixSearchResult, Verb, VerbExecutor};
Expand Down Expand Up @@ -50,7 +49,7 @@ impl AppState for HelpState {
AppStateCmdResult::Keep
}
Action::ScrollPage(dp) => {
self.area.try_scroll(*dp * i32::from(self.area.bottom-self.area.top));
self.area.try_scroll(*dp * (self.area.height()-1));
AppStateCmdResult::Keep
}
_ => AppStateCmdResult::Keep,
Expand Down
10 changes: 5 additions & 5 deletions src/screen_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ impl<'a, R> TextCol<'a, R> {}
/// A small utility to format some data in a tabular way on screen
pub struct TextTable<'a, R> {
cols: Vec<TextCol<'a, R>>,
bar: String, // according to skin
md_bar: String, // according to skin
}

impl<'a, R> TextTable<'a, R> {
pub fn new(skin: &Skin) -> TextTable<'a, R> {
let bar = format!(
let md_bar = format!(
" {}│{} ",
skin.table_border.fg,
skin.reset.fg,
);
TextTable {
cols: Vec::new(),
bar,
md_bar,
}
}
pub fn add_col(&mut self, title: &str, extract: &'a Fn(&'a R) -> &str) {
Expand All @@ -140,7 +140,7 @@ impl<'a, R> TextTable<'a, R> {
self.compute_col_widths(&rows);
let mut header = String::new();
for col in &self.cols {
header.push_str(&self.bar);
header.push_str(&self.md_bar);
// we're lazy here:
// we add some bold, and add 4 for the width because we know the * won't
// show up on screen.
Expand All @@ -150,7 +150,7 @@ impl<'a, R> TextTable<'a, R> {
for row in rows {
let mut line = String::new();
for (i, col) in self.cols.iter().enumerate() {
line.push_str(&self.bar);
line.push_str(&self.md_bar);
let s = (col.extract)(row);
if i == self.cols.len() - 1 {
line.push_str(&text.md_to_tty(s));
Expand Down
44 changes: 24 additions & 20 deletions src/skin.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
use std::io::{self, Write};

use crate::screens::Screen;

/// Defines the Skin structure with its defautl value.
///
/// A skin is a collection of skin entries and the
/// store of all color changing TTY codes used by
/// the application. It can be changed by configuration.
use std::collections::HashMap;
use termion::color::{self, *};

/// a Skin entry is a couple of strings, one for the foreground
/// and one for the background, each one made of TTY escape
/// codes defining color changes.
pub struct SkinEntry {
pub fg: String,
pub bg: String,
Expand Down Expand Up @@ -46,26 +50,26 @@ macro_rules! Skin {
}

Skin! {
status_normal: White, AnsiValue::grayscale(2)
status_error: Red, AnsiValue::grayscale(2)
tree: AnsiValue::grayscale(5), Reset
selected_line: Reset, AnsiValue::grayscale(2)
permissions: AnsiValue::grayscale(15), Reset
size_text: AnsiValue::grayscale(15), Reset
size_bar_full: Reset, Magenta
size_bar_void: Reset, AnsiValue::grayscale(2)
file: White, Reset
directory: LightBlue, Reset
char_match: Green, Reset
link: LightMagenta, Reset
code: Reset, AnsiValue::grayscale(2)
directory: LightBlue, Reset
file: White, Reset
file_error: Red, Reset
unlisted: AnsiValue::grayscale(13), Reset
input: White, Reset
flag_label: AnsiValue::grayscale(14), AnsiValue::grayscale(1)
flag_label: AnsiValue::grayscale(12), AnsiValue::grayscale(1)
flag_value: AnsiValue::grayscale(16), AnsiValue::grayscale(1)
code: Reset, AnsiValue::grayscale(2)
table_border: AnsiValue::grayscale(8), Reset
input: White, Reset
link: LightMagenta, Reset
permissions: AnsiValue::grayscale(15), Reset
selected_line: Reset, AnsiValue::grayscale(3)
size_bar_full: Reset, Magenta
size_bar_void: Reset, AnsiValue::grayscale(2)
size_text: AnsiValue::grayscale(15), Reset
spinner: AnsiValue::grayscale(10), AnsiValue::grayscale(2)
status_error: Red, AnsiValue::grayscale(2)
status_normal: White, AnsiValue::grayscale(2)
table_border: AnsiValue::grayscale(8), Reset
tree: AnsiValue::grayscale(5), Reset
unlisted: AnsiValue::grayscale(13), Reset
}


1 change: 0 additions & 1 deletion src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use std::io::{self, Write};
use termion;

use crate::screens::Screen;
use crate::skin::Skin;

pub trait Status {
fn write_status_text(&mut self, text: &str) -> io::Result<()>;
Expand Down

5 comments on commit edb1a79

@polyzen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently the lock file needs updating:
error: the lock file /home/user/pkg/build/broot/src/broot-0.6.2/Cargo.lock needs to be updated but --locked was passed to prevent this

@Canop
Copy link
Owner Author

@Canop Canop commented on edb1a79 Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@polyzen I just merged on another computer without problem. I don't reproduce nor understand this problem.

Note that this branch has been fully merged into master.

@polyzen
Copy link

@polyzen polyzen commented on edb1a79 Feb 19, 2019 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Canop
Copy link
Owner Author

@Canop Canop commented on edb1a79 Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed the Cargo.lock file. Is it better ?

@polyzen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the job, thank you.

Please sign in to comment.