mirror of
https://github.com/bootandy/dust.git
synced 2026-01-16 23:02:17 -08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdd85b9bf4 | ||
|
|
7a57cb97d7 | ||
|
|
129e5abb54 |
@@ -28,6 +28,3 @@ ignore-hidden=true
|
|||||||
output-format="si"
|
output-format="si"
|
||||||
|
|
||||||
number-of-lines=5
|
number-of-lines=5
|
||||||
|
|
||||||
# To keep the .git directory collapsed
|
|
||||||
collapse=[".git"]
|
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ pub struct Config {
|
|||||||
pub files0_from: Option<String>,
|
pub files0_from: Option<String>,
|
||||||
pub number_of_lines: Option<usize>,
|
pub number_of_lines: Option<usize>,
|
||||||
pub files_from: Option<String>,
|
pub files_from: Option<String>,
|
||||||
pub collapse: Option<Vec<String>>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
@@ -178,14 +177,6 @@ impl Config {
|
|||||||
pub fn get_changed_time_operator(&self, options: &Cli) -> Option<(Operator, i64)> {
|
pub fn get_changed_time_operator(&self, options: &Cli) -> Option<(Operator, i64)> {
|
||||||
get_filter_time_operator(options.ctime.as_ref(), get_current_date_epoch_seconds())
|
get_filter_time_operator(options.ctime.as_ref(), get_current_date_epoch_seconds())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_collapse(&self, options: &Cli) -> Option<Vec<String>> {
|
|
||||||
if self.collapse.is_none() {
|
|
||||||
options.collapse.clone()
|
|
||||||
} else {
|
|
||||||
self.collapse.clone()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_current_date_epoch_seconds() -> i64 {
|
fn get_current_date_epoch_seconds() -> i64 {
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ fn main() {
|
|||||||
indicator.spawn(output_format.clone())
|
indicator.spawn(output_format.clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
let keep_collapsed: HashSet<PathBuf> = match config.get_collapse(&options) {
|
let keep_collapsed: HashSet<PathBuf> = match options.collapse {
|
||||||
Some(ref collapse) => {
|
Some(ref collapse) => {
|
||||||
let mut combined_dirs = HashSet::new();
|
let mut combined_dirs = HashSet::new();
|
||||||
for collapse_dir in collapse {
|
for collapse_dir in collapse {
|
||||||
|
|||||||
Reference in New Issue
Block a user