Skip to content

Commit

Permalink
version bump -> 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Canop committed Jan 30, 2019
1 parent 3406e42 commit d18d886
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 61 deletions.
81 changes: 37 additions & 44 deletions Cargo.lock

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

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
[package]
name = "broot"
version = "0.4.7"
version = "0.5.0"
authors = ["dystroy <[email protected]>"]
repository = "https://github.com/Canop/broot"
description = "Fuzzy Search + tree + cd"
edition = "2018"
keywords = ["cli", "fuzzy", "tree", "search", "linux"]
keywords = ["cli", "fuzzy", "tree", "search", "linux", "regex"]
license = "MIT"
categories = ["command-line-utilities"]
readme = "README.md"

[dependencies]
termion = "1.5.1"
termion = "1.5"
regex = "1"
lazy_static = "1.2"
directories = "1.0"
toml = "0.4.9"
custom_error = "1.3.0"
toml = "0.4"
custom_error = "1.3"
log = "0.4"
simplelog = "0.5"
clap = "2.32"
glob = "0.2"
users = "0.8"
jemallocator = "0.1.8"
jemallocator = "0.1"

2 changes: 2 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ impl AppStateCmdResult {
}
}

// a whole application state, stackable to allow reverting
// to a previous one
pub trait AppState {
fn apply(&mut self, cmd: &mut Command, screen: &Screen, con: &AppContext) -> io::Result<AppStateCmdResult>;
fn has_pending_tasks(&self) -> bool;
Expand Down
10 changes: 5 additions & 5 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ use termion::event::Key;

#[derive(Debug)]
pub struct Command {
pub raw: String, // what's visible in the input
parts: CommandParts, // the parsed parts of the visible input
pub action: Action, // what's required, based on the last key (which may be not visible, like esc)
pub raw: String, // what's visible in the input
parts: CommandParts, // the parsed parts of the visible input
pub action: Action, // what's required, based on the last key (which may be not visible, like esc)
}

/// An intermediate parsed representation of the raw string
#[derive(Debug, Clone)]
struct CommandParts {
pattern: Option<String>,
pattern: Option<String>, // either a fuzzy pattern or the core of a regex
regex_flags: Option<String>, // may be Some("") if user asked for a regex but specified no flag
verb: Option<String>, // may be Some("") if user already typed the separator
}
Expand All @@ -24,7 +24,7 @@ struct CommandParts {
pub enum Action {
MoveSelection(i32), // up (neg) or down (positive) in the list
ScrollPage(i32), // in number of pages, not lines
OpenSelection, // open the selected line (which can't be the root by construct)
OpenSelection, // open the selected line
VerbEdit(String), // verb, unfinished
Verb(String), // verb, after the user hit enter
FuzzyPatternEdit(String), // a pattern being edited
Expand Down
6 changes: 3 additions & 3 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ use std::io;
use crate::conf;

custom_error! {pub ProgramError
Io {source: io::Error} = "IO Error",
Conf {source: conf::ConfError} = "Bad configuration",
Io {source: io::Error} = "IO Error",
Conf {source: conf::ConfError} = "Bad configuration",
ArgParse {bad: String, valid: String} = "{:?} can't be parsed (valid values: {:?})",
}

custom_error! {pub RegexError
Parsing {source: regex::Error} = "Invalid Regular Expression",
Parsing {source: regex::Error} = "Invalid Regular Expression",
UnknownFlag {bad: char} = "Unknown regular expression flag: {:?}",
}
3 changes: 1 addition & 2 deletions src/fuzzy_patterns.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! a simple and fast fuzzy pattern matcher for filename filtering / sorting.
//! a simple fuzzy pattern matcher for filename filtering / sorting.
//! It's not meant for file contents but for small strings (less than 1000 chars)
//! such as file names.
//! Speed is prefered over score precision.
use std::fmt;
use crate::patterns::{Match};
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use crate::external::Launchable;
use crate::tree_options::TreeOptions;
use crate::verbs::VerbStore;

const VERSION: &str = "0.4.7";
const VERSION: &str = "0.5.0";

// declare the possible CLI arguments, and gets the values
fn get_cli_args<'a>() -> clap::ArgMatches<'a> {
Expand Down

0 comments on commit d18d886

Please sign in to comment.