diff --git a/CHANGELOG.md b/CHANGELOG.md index 4727aafc..850f06a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ + +### v0.9.2 - 2019-07-31 +Fix non consistent builds due to lack of precise versionning in crossterm subcrate versionning ### v0.9.1 - 2019-07-29 diff --git a/Cargo.lock b/Cargo.lock index 85bf5c2e..8ae383e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -91,7 +91,12 @@ dependencies = [ "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossterm 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_cursor 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_input 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_screen 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_style 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_terminal 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_utils 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "custom_error 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "directories 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -101,7 +106,7 @@ dependencies = [ "opener 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "simplelog 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "termimad 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "termimad 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "umask 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "users 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -220,19 +225,6 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "crossterm" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossterm_cursor 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "crossterm_input 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "crossterm_screen 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossterm_style 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossterm_terminal 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "crossterm_utils 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "crossterm_cursor" version = "0.2.4" @@ -603,11 +595,16 @@ dependencies = [ [[package]] name = "termimad" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossterm 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_cursor 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_input 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_screen 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_style 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_terminal 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crossterm_utils 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "minimad 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -737,7 +734,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" -"checksum crossterm 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "21ac79357981b3c35917a377e6138729b66316db7649f9f96fbb517bb02361e5" "checksum crossterm_cursor 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4b8ddb43937bfafbe07d349ee9497754ceac818ee872116afccb076f2de28d3d" "checksum crossterm_input 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a23a71b51ddc8f74e13e341179b1a26b20f0030d14ff8fbdd9da45fd0e342bc5" "checksum crossterm_screen 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "90889b9f1d7867a583dede34deab1e32a10379e9eb70d920ca7895e144aa6d65" @@ -785,7 +781,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum syn 0.15.30 (registry+https://github.com/rust-lang/crates.io-index)" = "66c8865bf5a7cbb662d8b011950060b3c8743dca141b054bf7195b20d314d8e2" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" -"checksum termimad 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f609fdfb858415c8b923de9b51820d18274b714fad021d8702b1f613217b9189" +"checksum termimad 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a1f13066780ec95e8d43f336b92d770fbef329c1b19d8ed78c7c015d2b0ba091" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" diff --git a/Cargo.toml b/Cargo.toml index 631e2699..c2cde654 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "broot" -version = "0.9.1" +version = "0.9.2" authors = ["dystroy "] repository = "https://github.com/Canop/broot" description = "Fuzzy Search + tree + cd" @@ -23,9 +23,14 @@ clap = "2.33" glob = "0.3" crossbeam = "0.7" opener = "0.4" -crossterm = "0.9.6" +crossterm_cursor = "=0.2.4" +crossterm_input = "=0.3.6" +crossterm_screen = "=0.2.3" +crossterm_style = "=0.3.3" +crossterm_terminal = "=0.2.4" +crossterm_utils = "=0.2.3" umask = "0.1.4" -termimad = "0.6.1" +termimad = "0.6.2" #termimad = { path = "../termimad" } [target.'cfg(unix)'.dependencies] diff --git a/src/browser_states.rs b/src/browser_states.rs index 9f5c2fce..0061b13b 100644 --- a/src/browser_states.rs +++ b/src/browser_states.rs @@ -5,6 +5,7 @@ use std::time::Instant; use std::fs::OpenOptions; use opener; +use crossterm_terminal::{ClearType, Terminal}; use crate::app::{AppState, AppStateCmdResult}; use crate::app_context::AppContext; @@ -436,8 +437,8 @@ impl AppState for BrowserState { let tree = self.displayed_tree(); let total_char_size = 9; screen.goto(screen.w - total_char_size, screen.h); - let terminal = crossterm::Terminal::new(); - terminal.clear(crossterm::ClearType::UntilNewLine)?; + let terminal = Terminal::new(); + terminal.clear(ClearType::UntilNewLine)?; let h_value = if tree.options.show_hidden { 'y' } else { 'n' }; let gi_value = match tree.options.respect_git_ignore { OptionBool::Auto => 'a', diff --git a/src/cli.rs b/src/cli.rs index db1ac278..f020a566 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -6,7 +6,7 @@ use std::io; use std::path::PathBuf; use std::result::Result; -use crossterm::Color::{self, *}; +use crossterm_style::Color; use termimad::{Alignment, MadSkin}; use crate::errors::{ProgramError, TreeBuildError}; @@ -167,7 +167,7 @@ pub fn read_launch_args() -> Result { /// wait for user input, return `true` if she /// didn't answer 'n' pub fn ask_authorization() -> io::Result { - let answer = crossterm::input().read_line()?; + let answer = crossterm_input::input().read_line()?; Ok(match answer.as_ref() { "n" | "N" => false, _ => true, @@ -177,8 +177,8 @@ pub fn ask_authorization() -> io::Result { pub fn mad_skin() -> MadSkin { let mut skin = MadSkin::default(); skin.set_headers_fg(Color::AnsiValue(178)); - skin.bold.set_fg(Yellow); - skin.italic.set_fg(Magenta); + skin.bold.set_fg(Color::Yellow); + skin.italic.set_fg(Color::Magenta); skin.code_block.align = Alignment::Center; skin } diff --git a/src/commands.rs b/src/commands.rs index 007aaa07..7f09fca8 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -2,7 +2,7 @@ //! in the input. It's independant of the state of the application //! (verbs arent checked at this point) -use crossterm::KeyEvent; +use crossterm_input::KeyEvent; use regex::Regex; use crate::verb_invocation::VerbInvocation; use termimad::{ diff --git a/src/conf.rs b/src/conf.rs index 539d8aeb..f83257d3 100644 --- a/src/conf.rs +++ b/src/conf.rs @@ -1,8 +1,7 @@ //! manage reading the verb shortcuts from the configuration file, //! initializing if if it doesn't yet exist -use crossterm::Attribute; -use crossterm::ObjectStyle; +use crossterm_style::{Attribute, ObjectStyle}; use directories::ProjectDirs; use std::collections::HashMap; use std::fs; diff --git a/src/displayable_tree.rs b/src/displayable_tree.rs index d5539c32..bb4982e4 100644 --- a/src/displayable_tree.rs +++ b/src/displayable_tree.rs @@ -1,6 +1,6 @@ use std::fmt; use std::time::SystemTime; -use crossterm::{ClearType, Terminal}; +use crossterm_terminal::{ClearType, Terminal}; use chrono::offset::Local; use chrono::DateTime; @@ -15,7 +15,8 @@ use crate::flat_tree::{LineType, Tree, TreeLine}; use crate::patterns::Pattern; use crate::skin::{Skin, SkinEntry}; -use crossterm::{Color, Colored, TerminalCursor}; +use crossterm_style::{Color, Colored}; +use crossterm_cursor::TerminalCursor; /// A tree wrapper implementing Display /// which can be used either diff --git a/src/help_states.rs b/src/help_states.rs index 04c44756..3770f2a1 100644 --- a/src/help_states.rs +++ b/src/help_states.rs @@ -1,6 +1,6 @@ use std::io; -use crossterm::{Terminal, ClearType}; +use crossterm_terminal::{Terminal, ClearType}; use termimad::{Area, MadView}; use crate::app::{AppState, AppStateCmdResult}; diff --git a/src/patterns.rs b/src/patterns.rs index 03ee1f77..dc2ecccb 100644 --- a/src/patterns.rs +++ b/src/patterns.rs @@ -6,7 +6,7 @@ use core::result; use std::{fmt, mem}; -use crossterm::ObjectStyle; +use crossterm_style::ObjectStyle; use crate::commands::Command; use crate::errors::RegexError; diff --git a/src/screens.rs b/src/screens.rs index 9c032aea..529f518a 100644 --- a/src/screens.rs +++ b/src/screens.rs @@ -1,6 +1,8 @@ use std::io; -use crossterm::{self, AlternateScreen, ClearType, TerminalCursor}; +use crossterm_cursor::TerminalCursor; +use crossterm_screen::AlternateScreen; +use crossterm_terminal::{ClearType}; use termimad::{ Area, CompoundStyle, @@ -15,7 +17,7 @@ use crate::skin::Skin; pub struct Screen { pub w: u16, pub h: u16, - pub alternate_screen: crossterm::AlternateScreen, + pub alternate_screen: crossterm_screen::AlternateScreen, pub skin: Skin, pub input_field: InputField, } @@ -39,7 +41,7 @@ impl Screen { Ok(screen) } pub fn read_size(&mut self, con: &AppContext) -> io::Result<()> { - let terminal = crossterm::Terminal::new(); + let terminal = crossterm_terminal::Terminal::new(); let (w, h) = terminal.terminal_size(); self.w = w; self.h = h + 1; @@ -61,7 +63,7 @@ impl Screen { cursor.goto(x - 1, y - 1).unwrap(); } pub fn clear_line(&self) { - let terminal = crossterm::Terminal::new(); + let terminal = crossterm_terminal::Terminal::new(); terminal.clear(ClearType::UntilNewLine).unwrap(); // FIXME try to manage those errors } } diff --git a/src/skin.rs b/src/skin.rs index 29ff7369..9d92c240 100644 --- a/src/skin.rs +++ b/src/skin.rs @@ -8,7 +8,7 @@ use std::collections::HashMap; use std::fmt; -use crossterm::{ +use crossterm_style::{ Attribute::{self, *}, Color::AnsiValue, Color::{self, *}, diff --git a/src/skin_conf.rs b/src/skin_conf.rs index c8325235..4184c4e3 100644 --- a/src/skin_conf.rs +++ b/src/skin_conf.rs @@ -1,4 +1,4 @@ -use crossterm::{ +use crossterm_style::{ Attribute::{self, *}, Color::{self, *}, ObjectStyle, diff --git a/src/status.rs b/src/status.rs index 72c7e4db..e1556aa5 100644 --- a/src/status.rs +++ b/src/status.rs @@ -2,7 +2,7 @@ use std::io; use crate::screens::Screen; use crate::skin::{self, SkinEntry}; -use crossterm::ObjectStyle; +use crossterm_style::ObjectStyle; /// the status module manages writing information on the grey line /// near the bottom of the screen