Remove shell with --exec
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Matthias Reitinger · committed by David Peter · parent 1a6c92c · Browse files · 8 files·+213 added−305 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
8 files+213 added−305 removed
- other:+213 added−305 removed
Provenance
- Commit
18709b1- Tree
3a4e28b- Author
Matthias Reitinger <reima@edenprime.de>- Committer
David Peter <sharkdp@users.noreply.github.com>- Parent
1a6c92c
8 files changed+213 added−305 removed
modified:src/exec/input.rs+68 added-137 removed
5 unmodified lines6 // notice may not be copied, modified, or distributed except7 // according to those terms.8 9 use std::path::MAIN_SEPARATOR;10-use std::borrow::Cow;10 12-use shell_escape::escape;11+/// Removes the parent component of the path12+pub fn basename(path: &str) -> &str {13+ let mut index = 0;14+ for (id, character) in path.char_indices() {15+ if character == MAIN_SEPARATOR {16+ index = id;17+ }18+ }19 14-/// A builder for efficiently generating input strings.15-///16-/// After choosing your required specs, the `get()` method will escape special characters found17-/// in the input. Allocations will only occur if special characters are found that need to be18-/// escaped.19-pub struct Input<'a> {20- data: &'a str,20+ // FIXME: On Windows, should return what for C:file.txt D:file.txt and \\server\share ?21+ if index != 0 {22+ return &path[index + 1..];23+ }24+25+ path26 }27 23-impl<'a> Input<'a> {24- /// Creates a new `Input` structure, which provides access to command-building25- /// primitives, such as `basename()` and `dirname()`.26- pub fn new(data: &'a str) -> Input<'a> {27- Input { data }28- }28+/// Removes the extension from the path29+pub fn remove_extension(path: &str) -> &str {30+ let mut has_dir = false;31+ let mut dir_index = 0;32+ let mut ext_index = 0;33 30- /// Removes the parent component of the path31- pub fn basename(&'a mut self) -> &'a mut Self {32- let mut index = 0;33- for (id, character) in self.data.char_indices() {34- if character == MAIN_SEPARATOR {35- index = id;36- }34+ for (id, character) in path.char_indices() {35+ if character == MAIN_SEPARATOR {36+ has_dir = true;37+ dir_index = id;38 }38-39- // FIXME: On Windows, should return what for C:file.txt D:file.txt and \\server\share ?40- if index != 0 {41- self.data = &self.data[index + 1..]39+ if character == '.' {40+ ext_index = id;41 }42+ }43 44- self44+ // Account for hidden files and directories45+ if ext_index != 0 && (!has_dir || dir_index + 2 <= ext_index) {46+ return &path[0..ext_index];47 }48 47- /// Removes the extension from the path48- pub fn remove_extension(&'a mut self) -> &'a mut Self {49- let mut has_dir = false;50- let mut dir_index = 0;51- let mut ext_index = 0;49+ path50+}51 53- for (id, character) in self.data.char_indices() {54- if character == MAIN_SEPARATOR {55- has_dir = true;56- dir_index = id;57- }58- if character == '.' {59- ext_index = id;60- }52+/// Removes the basename from the path.53+pub fn dirname(path: &str) -> &str {54+ let mut has_dir = false;55+ let mut index = 0;56+ for (id, character) in path.char_indices() {57+ if character == MAIN_SEPARATOR {58+ has_dir = true;59+ index = id;60 }62-63- // Account for hidden files and directories64- if ext_index != 0 && (!has_dir || dir_index + 2 <= ext_index) {65- self.data = &self.data[0..ext_index];66- }67-68- self61 }62 71- /// Removes the basename from the path.72- pub fn dirname(&'a mut self) -> &'a mut Self {73- let mut has_dir = false;74- let mut index = 0;75- for (id, character) in self.data.char_indices() {76- if character == MAIN_SEPARATOR {77- has_dir = true;78- index = id;79- }80- }81-82- // FIXME: On Windows, return what for C:file.txt D:file.txt and \\server\share ?83- self.data = if !has_dir {84- "."85- } else if index == 0 {86- &self.data[..1]87- } else {88- &self.data[0..index]63+ // FIXME: On Windows, return what for C:file.txt D:file.txt and \\server\share ?64+ if !has_dir {65+ "."66+ } else if index == 0 {67+ &path[..1]68+ } else {69+ &path[0..index]89- };90-91- self70 }93-94- pub fn get(&'a self) -> Cow<'a, str> {95- escape(Cow::Borrowed(self.data))96- }97-98- #[cfg(test)]99- fn get_private(&'a self) -> Cow<'a, str> {100- Cow::Borrowed(self.data)101- }71 }72 73 #[cfg(test)]74 mod tests {106- use super::{MAIN_SEPARATOR, Input};75+ use super::{MAIN_SEPARATOR, basename, dirname, remove_extension};76 77 fn correct(input: &str) -> String {109- let mut sep = String::new();110- sep.push(MAIN_SEPARATOR);111- input.replace('/', &sep)78+ input.replace('/', &MAIN_SEPARATOR.to_string())79 }80 81 #[test]82 fn path_remove_ext_simple() {116- assert_eq!(117- &Input::new("foo.txt").remove_extension().get_private(),118- "foo"119- );83+ assert_eq!(remove_extension("foo.txt"), "foo");84 }85 86 #[test]87 fn path_remove_ext_dir() {88 assert_eq!(125- &Input::new(&correct("dir/foo.txt"))126- .remove_extension()127- .get_private(),128- &correct("dir/foo")89+ remove_extension(&correct("dir/foo.txt")),90+ correct("dir/foo")91 );92 }93 94 #[test]95 fn path_hidden() {134- assert_eq!(&Input::new(".foo").remove_extension().get_private(), ".foo")96+ assert_eq!(remove_extension(".foo"), ".foo")97 }98 99 #[test]100 fn path_remove_ext_utf8() {139- assert_eq!(140- &Input::new("💖.txt").remove_extension().get_private(),141- "💖"142- );101+ assert_eq!(remove_extension("💖.txt"), "💖");102 }103 104 #[test]105 fn path_remove_ext_empty() {147- assert_eq!(&Input::new("").remove_extension().get_private(), "");106+ assert_eq!(remove_extension(""), "");107 }108 109 #[test]110 fn path_basename_simple() {152- assert_eq!(&Input::new("foo.txt").basename().get_private(), "foo.txt");111+ assert_eq!(basename("foo.txt"), "foo.txt");112 }113 114 #[test]115 fn path_basename_no_ext() {157- assert_eq!(158- &Input::new("foo.txt")159- .basename()160- .remove_extension()161- .get_private(),162- "foo"163- );116+ assert_eq!(remove_extension(basename("foo.txt")), "foo");117 }118 119 #[test]120 fn path_basename_dir() {168- assert_eq!(169- &Input::new(&correct("dir/foo.txt")).basename().get_private(),170- "foo.txt"171- );121+ assert_eq!(basename(&correct("dir/foo.txt")), "foo.txt");122 }123 124 #[test]125 fn path_basename_empty() {176- assert_eq!(&Input::new("").basename().get_private(), "");126+ assert_eq!(basename(""), "");127 }128 129 #[test]130 fn path_basename_utf8() {181- assert_eq!(182- &Input::new(&correct("💖/foo.txt"))183- .basename()184- .get_private(),185- "foo.txt"186- );187- assert_eq!(188- &Input::new(&correct("dir/💖.txt"))189- .basename()190- .get_private(),191- "💖.txt"192- );131+ assert_eq!(basename(&correct("💖/foo.txt")), "foo.txt");132+ assert_eq!(basename(&correct("dir/💖.txt")), "💖.txt");133 }134 135 #[test]136 fn path_dirname_simple() {197- assert_eq!(&Input::new("foo.txt").dirname().get_private(), ".");137+ assert_eq!(dirname("foo.txt"), ".");138 }139 140 #[test]141 fn path_dirname_dir() {202- assert_eq!(203- &Input::new(&correct("dir/foo.txt")).dirname().get_private(),204- "dir"205- );142+ assert_eq!(dirname(&correct("dir/foo.txt")), "dir");143 }144 145 #[test]146 fn path_dirname_utf8() {210- assert_eq!(211- &Input::new(&correct("💖/foo.txt")).dirname().get_private(),212- "💖"213- );214- assert_eq!(215- &Input::new(&correct("dir/💖.txt")).dirname().get_private(),216- "dir"217- );147+ assert_eq!(dirname(&correct("💖/foo.txt")), "💖");148+ assert_eq!(dirname(&correct("dir/💖.txt")), "dir");149 }150 151 #[test]152 fn path_dirname_empty() {222- assert_eq!(&Input::new("").dirname().get_private(), ".");153+ assert_eq!(dirname(""), ".");154 }155 156 #[test]157 fn path_dirname_root() {158 #[cfg(windows)]228- assert_eq!(&Input::new("C:\\").dirname().get_private(), "C:");159+ assert_eq!(dirname("C:\\"), "C:");160 #[cfg(windows)]230- assert_eq!(&Input::new("\\").dirname().get_private(), "\\");161+ assert_eq!(dirname("\\"), "\\");162 #[cfg(not(windows))]232- assert_eq!(&Input::new("/").dirname().get_private(), "/");163+ assert_eq!(dirname("/"), "/");164 }165 }modified:src/exec/job.rs+2 added-7 removed
18 unmodified lines19 rx: Arc<Mutex<Receiver<PathBuf>>>,20 cmd: Arc<TokenizedCommand>,21 out_perm: Arc<Mutex<()>>,22 ) {23- // A string buffer that will be re-used in each iteration.24- let buffer = &mut String::with_capacity(256);25-23 loop {24 // Create a lock on the shared receiver for this thread.25 let lock = rx.lock().unwrap();26 5 unmodified lines32 };33 34 // Drop the lock so that other threads can read from the the receiver.35 drop(lock);39- // Generate a command to store within the buffer, and execute the command.40- // Note that the `then_execute()` method will clear the buffer for us.41- cmd.generate(buffer, &value, Arc::clone(&out_perm))42- .then_execute();36+ // Generate a command and execute it.37+ cmd.generate(&value, Arc::clone(&out_perm)).then_execute();38 }39 }modified:src/exec/mod.rs+119 added-115 removed
10 unmodified lines11 mod token;12 mod job;13 mod input;14 15+use std::borrow::Cow;16 use std::path::Path;17 use std::sync::{Arc, Mutex};18 18-// use self::paths::{basename, dirname, remove_extension};19-use self::input::Input;19+use regex::Regex;20+21+use self::input::{basename, dirname, remove_extension};22 use self::ticket::CommandTicket;23 use self::token::Token;24 pub use self::job::job;25 24-/// Signifies that a placeholder token was found25-const PLACE: u8 = 1;26-27-/// Signifies that the '{' character was found.28-const OPEN: u8 = 2;29-30-/// Contains a collection of `Token`'s that are utilized to generate command strings.26+/// Contains a collection of `TokenizedArgument`s that are utilized to generate command strings.27 ///32-/// The tokens are a represntation of the supplied command template, and are meant to be coupled33-/// with an input in order to generate a command. The `generate()` method will be used to34-/// generate a command and obtain a ticket for executing that command.28+/// The arguments are a representation of the supplied command template, and are meant to be coupled29+/// with an input in order to generate a command. The `generate()` method will be used to generate30+/// a command and obtain a ticket for executing that command.31 #[derive(Debug, Clone, PartialEq)]32 pub struct TokenizedCommand {37- pub tokens: Vec<Token>,33+ args: Vec<TokenizedArgument>,34 }35 40-impl TokenizedCommand {41- pub fn new(input: &str) -> TokenizedCommand {42- let mut tokens = Vec::new();43- let mut start = 0;44- let mut flags = 0;45- let mut chars = input.char_indices();46- let mut text = String::new();36+/// Represents a single command argument.37+///38+/// The argument is either a collection of `Token`s including at least one placeholder variant,39+/// or a fixed text.40+#[derive(Clone, Debug, PartialEq)]41+enum TokenizedArgument {42+ Tokens(Vec<Token>),43+ Text(String),44+}45 48- while let Some((id, character)) = chars.next() {49- match character {50- // Backslashes are useful in cases where we want to use the '{' character51- // without having all occurrences of it to collect placeholder tokens.52- '\\' => {53- if let Some((_, nchar)) = chars.next() {54- if nchar != '{' {55- text.push(character);56- }57- text.push(nchar);46+impl TokenizedArgument {47+ pub fn generate<'a>(&'a self, path: &str) -> Cow<'a, str> {48+ use self::Token::*;49+50+ match *self {51+ TokenizedArgument::Tokens(ref tokens) => {52+ let mut s = String::new();53+ for token in tokens {54+ match *token {55+ Basename => s += basename(path),56+ BasenameNoExt => s += remove_extension(basename(path)),57+ NoExt => s += remove_extension(path),58+ Parent => s += dirname(path),59+ Placeholder => s += path,60+ Text(ref string) => s += string,61 }62 }60- // When a raw '{' is discovered, we will note it's position, and use that for a61- // later comparison against valid placeholder tokens.62- '{' if flags & OPEN == 0 => {63- flags |= OPEN;64- start = id;65- if !text.is_empty() {66- append(&mut tokens, &text);67- text.clear();68- }63+ Cow::Owned(s)64+ }65+ TokenizedArgument::Text(ref text) => Cow::Borrowed(text),66+ }67+ }68+}69+70+impl TokenizedCommand {71+ pub fn new<I, S>(input: I) -> TokenizedCommand72+ where73+ I: IntoIterator<Item = S>,74+ S: AsRef<str>,75+ {76+ lazy_static! {77+ static ref PLACEHOLDER: Regex = Regex::new(r"\{(/?\.?|//)\}").unwrap();78+ }79+80+ let mut args = Vec::new();81+ let mut has_placeholder = false;82+83+ for arg in input {84+ let arg = arg.as_ref();85+86+ let mut tokens = Vec::new();87+ let mut start = 0;88+89+ for placeholder in PLACEHOLDER.find_iter(arg) {90+ // Leading text before the placeholder.91+ if placeholder.start() > start {92+ tokens.push(Token::Text(arg[start..placeholder.start()].to_owned()));93 }70- // If the `OPEN` bit is set, we will compare the contents between the discovered71- // '{' and '}' characters against a list of valid tokens, then pushing the72- // corresponding token onto the `tokens` vector.73- '}' if flags & OPEN != 0 => {74- flags ^= OPEN;75- match &input[start + 1..id] {76- "" => tokens.push(Token::Placeholder),77- "." => tokens.push(Token::NoExt),78- "/" => tokens.push(Token::Basename),79- "//" => tokens.push(Token::Parent),80- "/." => tokens.push(Token::BasenameNoExt),81- _ => {82- append(&mut tokens, &input[start..id + 1]);83- continue;84- }85- }86- flags |= PLACE;94+95+ start = placeholder.end();96+97+ match placeholder.as_str() {98+ "{}" => tokens.push(Token::Placeholder),99+ "{.}" => tokens.push(Token::NoExt),100+ "{/}" => tokens.push(Token::Basename),101+ "{//}" => tokens.push(Token::Parent),102+ "{/.}" => tokens.push(Token::BasenameNoExt),103+ _ => panic!("Unhandled placeholder"),104 }88- // We aren't collecting characters for a text string if the `OPEN` bit is set.89- _ if flags & OPEN != 0 => (),90- // Push the character onto the text buffer91- _ => text.push(character),105+106+ has_placeholder = true;107 }93- }108 95- // Take care of any stragglers left behind.96- if !text.is_empty() {97- append(&mut tokens, &text);109+ // Without a placeholder, the argument is just fixed text.110+ if tokens.is_empty() {111+ args.push(TokenizedArgument::Text(arg.to_owned()));112+ continue;113+ }114+115+ if start < arg.len() {116+ // Trailing text after last placeholder.117+ tokens.push(Token::Text(arg[start..].to_owned()));118+ }119+120+ args.push(TokenizedArgument::Tokens(tokens));121 }122 123 // If a placeholder token was not supplied, append one at the end of the command.101- if flags & PLACE == 0 {102- append(&mut tokens, " ");103- tokens.push(Token::Placeholder)124+ if !has_placeholder {125+ args.push(TokenizedArgument::Tokens(vec![Token::Placeholder]));126 }127 106- TokenizedCommand { tokens: tokens }128+ TokenizedCommand { args: args }129 }130 131 /// Generates a ticket that is required to execute the generated command.132 ///111- /// Using the internal `tokens` field, and a supplied `input` variable, commands will be112- /// written into the `command` buffer. Once all tokens have been processed, the mutable113- /// reference of the `command` will be wrapped within a `CommandTicket`, which will be114- /// responsible for executing the command and clearing the buffer.115- pub fn generate<'a>(116- &self,117- command: &'a mut String,118- input: &Path,119- out_perm: Arc<Mutex<()>>,120- ) -> CommandTicket<'a> {121- use self::Token::*;122- let input = input.strip_prefix(".").unwrap_or(input).to_string_lossy();123- for token in &self.tokens {124- match *token {125- Basename => *command += &Input::new(&input).basename().get(),126- BasenameNoExt => {127- *command += &Input::new(&input).basename().remove_extension().get()128- }129- NoExt => *command += &Input::new(&input).remove_extension().get(),130- Parent => *command += &Input::new(&input).dirname().get(),131- Placeholder => *command += &Input::new(&input).get(),132- Text(ref string) => *command += string,133- }133+ /// Using the internal `args` field, and a supplied `input` variable, arguments will be134+ /// collected in a Vec. Once all arguments have been processed, the Vec will be wrapped135+ /// within a `CommandTicket`, which will be responsible for executing the command.136+ pub fn generate(&self, input: &Path, out_perm: Arc<Mutex<()>>) -> CommandTicket {137+ let input = input138+ .strip_prefix(".")139+ .unwrap_or(input)140+ .to_string_lossy()141+ .into_owned();142+143+ let mut args = Vec::with_capacity(self.args.len());144+ for arg in &self.args {145+ args.push(arg.generate(&input));146 }147 136- CommandTicket::new(command, out_perm)148+ CommandTicket::new(args, out_perm)149 }150 }151 140-/// If the last token is a text token, append to that token. Otherwise, create a new token.141-fn append(tokens: &mut Vec<Token>, elem: &str) {142- // Useful to avoid a borrowing issue with the tokens vector.143- let mut append_text = false;144-145- // If the last token is a `Text` token, simply the `elem` at the end.146- match tokens.last_mut() {147- Some(&mut Token::Text(ref mut string)) => *string += elem,148- _ => append_text = true,149- };150-151- // Otherwise, we will need to add a new `Text` token that contains the `elem`152- if append_text {153- tokens.push(Token::Text(String::from(elem)));154- }155-}156-152 #[cfg(test)]153 mod tests {159- use super::{TokenizedCommand, Token};154+ use super::{TokenizedCommand, TokenizedArgument, Token};155 156 #[test]157 fn tokens() {158 let expected = TokenizedCommand {164- tokens: vec![Token::Text("echo ${SHELL}: ".into()), Token::Placeholder],159+ args: vec![160+ TokenizedArgument::Text("echo".into()),161+ TokenizedArgument::Text("${SHELL}:".into()),162+ TokenizedArgument::Tokens(vec![Token::Placeholder]),163+ ],164 };165 167- assert_eq!(TokenizedCommand::new("echo $\\{SHELL}: {}"), expected);168- assert_eq!(TokenizedCommand::new("echo ${SHELL}:"), expected);166+ assert_eq!(TokenizedCommand::new(&[&"echo", &"${SHELL}:"]), expected);167+168 assert_eq!(170- TokenizedCommand::new("echo {.}"),171- TokenizedCommand { tokens: vec![Token::Text("echo ".into()), Token::NoExt] }169+ TokenizedCommand::new(&["echo", "{.}"]),170+ TokenizedCommand {171+ args: vec![172+ TokenizedArgument::Text("echo".into()),173+ TokenizedArgument::Tokens(vec![Token::NoExt]),174+ ],175+ }176 );177 }178 }modified:src/exec/ticket.rs+20 added-35 removed
4 unmodified lines5 // at your option. All files in the project carrying such6 // notice may not be copied, modified, or distributed except7 // according to those terms.8 9-use std::env;9 use std::process::Command;10 use std::sync::{Arc, Mutex};11 use std::io;12 14-lazy_static! {15- /// On non-Windows systems, the `SHELL` environment variable will be used to determine the16- /// preferred shell of choice for execution. Windows will simply use `cmd`.17- static ref COMMAND: (String, &'static str) = if cfg!(target_os = "windows") {18- ("cmd".into(), "/C")19- } else {20- (env::var("SHELL").unwrap_or_else(|_| "/bin/sh".into()), "-c")21- };22-}23-13 /// A state that offers access to executing a generated command.14 ///26-/// The ticket holds a mutable reference to a string that contains the command to be executed.27-/// After execution of the the command via the `then_execute()` method, the string will be28-/// cleared so that a new command can be written to the string in the future.29-pub struct CommandTicket<'a> {30- command: &'a mut String,15+/// The ticket holds the collection of arguments of a command to be executed.16+pub struct CommandTicket {17+ args: Vec<String>,18 out_perm: Arc<Mutex<()>>,19 }20 34-impl<'a> CommandTicket<'a> {35- pub fn new(command: &'a mut String, out_perm: Arc<Mutex<()>>) -> CommandTicket<'a> {36- CommandTicket { command, out_perm }21+impl CommandTicket {22+ pub fn new<I, S>(args: I, out_perm: Arc<Mutex<()>>) -> CommandTicket23+ where24+ I: IntoIterator<Item = S>,25+ S: AsRef<str>,26+ {27+ CommandTicket {28+ args: args.into_iter().map(|x| x.as_ref().to_owned()).collect(),29+ out_perm: out_perm,30+ }31 }32 39- /// Executes the command stored within the ticket, and40- /// clearing the command's buffer when finished.'33+ /// Executes the command stored within the ticket.34 #[cfg(not(unix))]35 pub fn then_execute(self) {36 use std::process::Stdio;37 use std::io::Write;38 46- // Spawn a shell with the supplied command.47- let cmd = Command::new(COMMAND.0.as_str())48- .arg(COMMAND.1)49- .arg(&self.command)39+ // Spawn the supplied command.40+ let cmd = Command::new(&self.args[0])41+ .args(&self.args[1..])42 .stdout(Stdio::piped())43 .stderr(Stdio::piped())44 .output();45 11 unmodified lines57 let _ = stderr.lock().write_all(&output.stderr);58 }59 Err(why) => eprintln!("fd: exec error: {}", why),60 }69-70- // Clear the buffer for later re-use.71- self.command.clear();61 }62 63 #[cfg(all(unix))]64 pub fn then_execute(self) {11 unmodified lines76 pipe(stdout_fds.as_mut_ptr());77 pipe(stderr_fds.as_mut_ptr());78 }79 91- // Spawn a shell with the supplied command.92- let cmd = Command::new(COMMAND.0.as_str())93- .arg(COMMAND.1)94- .arg(&self.command)80+ // Spawn the supplied command.81+ let cmd = Command::new(&self.args[0])82+ .args(&self.args[1..])83 // Configure the pipes accordingly in the child.84 .before_exec(move || unsafe {85 // Redirect the child's std{out,err} to the write ends of our pipe.86 dup2(stdout_fds[1], STDOUT_FILENO);34 unmodified lines121 let _ = io::copy(&mut perr, &mut stderr.lock());122 }123 Err(why) => eprintln!("fd: exec error: {}", why),124 }137-138- // Clear the command string's buffer for later re-use.139- self.command.clear();125 }126 }modified:src/app.rs+3 added-1 removed
83 unmodified lines84 .arg(85 arg("exec")86 .long("exec")87 .short("x")88- .takes_value(true)88+ .multiple(true)89+ .allow_hyphen_values(true)90+ .value_terminator(";")91 .value_name("cmd"),92 )93 .arg(94 arg("exclude")120 unmodified linesmodified:src/main.rs+1 added-2 removed
16 unmodified lines17 extern crate libc;18 extern crate num_cpus;19 extern crate regex;20 extern crate regex_syntax;21-extern crate shell_escape;21 22 pub mod fshelper;23 pub mod lscolors;24 mod app;79 unmodified lines104 } else {105 None106 };107 109- let command = matches.value_of("exec").map(|x| TokenizedCommand::new(x));108+ let command = matches.values_of("exec").map(TokenizedCommand::new);109 110 let config = FdOptions {111 case_sensitive,112 search_full_path: matches.is_present("full-path"),47 unmodified linesmodified:Cargo.lock-7 removed
11 unmodified lines12 "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",13 "num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",14 "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",15 "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",16- "shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",16 "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",17 "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",18 "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",19 ]207 unmodified lines227 "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",228 ]229 230 [[package]]232-name = "shell-escape"233-version = "0.1.3"234-source = "registry+https://github.com/rust-lang/crates.io-index"235-236-[[package]]231 name = "strsim"232 version = "0.6.0"233 source = "registry+https://github.com/rust-lang/crates.io-index"234 123 unmodified lines358 "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76"359 "checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"360 "checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"361 "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"368-"checksum shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5cc96481d54583947bfe88bf30c23d53f883c6cd0145368b69989d97b84ef8"362 "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"363 "checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6"364 "checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209"365 "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"11 unmodified linesmodified:Cargo.toml-1 removed
38 unmodified lines3940414243434445467 unmodified lines38 unmodified lineslazy_static = "0.2.9"num_cpus = "1.6.2"regex = "0.2"regex-syntax = "0.4"shell-escape = "0.1.3"
[target.'cfg(all(unix, not(target_os = "redox")))'.dependencies]libc = "0.2"
7 unmodified lines