diff options
author | Ben S <ogham@bsago.me> | 2015-02-13 21:24:10 +0000 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-02-13 21:24:10 +0000 |
commit | d180a5f5e42c397f6ea892984136e1317e148edf (patch) | |
tree | 4105545f5ad0084c534f587484f32bddc7ffc427 /src/dir.rs | |
parent | 113df664084069cdaa441d733e890e09607ebbb4 (diff) |
Use ansi_term's awesome new continuation colours
Diffstat (limited to 'src/dir.rs')
-rw-r--r-- | src/dir.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,7 +1,7 @@ use std::old_io::{fs, IoResult}; use file::{File, GREY}; -#[cfg(feature="git")] use ansi_term::ANSIString; +#[cfg(feature="git")] use ansi_term::{ANSIString, ANSIStrings}; #[cfg(feature="git")] use ansi_term::Colour::*; #[cfg(feature="git")] use git2; @@ -96,7 +96,7 @@ impl Git { let status = self.statuses.iter() .find(|p| p.0 == path.as_vec()); match status { - Some(&(_, s)) => format!("{}{}", Git::index_status(s), Git::working_tree_status(s)), + Some(&(_, s)) => ANSIStrings( &[Git::index_status(s), Git::working_tree_status(s) ]).to_string(), None => GREY.paint("--").to_string(), } } @@ -109,7 +109,7 @@ impl Git { .filter(|p| p.0.starts_with(dir.as_vec())) .fold(git2::Status::empty(), |a, b| a | b.1); - format!("{}{}", Git::index_status(s), Git::working_tree_status(s)) + ANSIStrings( &[Git::index_status(s), Git::working_tree_status(s)] ).to_string() } /// The character to display if the file has been modified, but not staged. |