mirror of
https://github.com/bootandy/dust.git
synced 2026-01-09 19:55:55 -08:00
Compare commits
4 Commits
config_col
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
709b87e137 | ||
|
|
3a16a6a234 | ||
|
|
2066b7fa86 | ||
|
|
07be4261b9 |
5
.github/workflows/CICD.yml
vendored
5
.github/workflows/CICD.yml
vendored
@@ -126,11 +126,6 @@ jobs:
|
||||
target: x86_64-unknown-linux-musl,
|
||||
use-cross: use-cross,
|
||||
}
|
||||
- {
|
||||
os: deb-latest,
|
||||
target: x86_64-unknown-linux-musl,
|
||||
use-cross: use-cross,
|
||||
}
|
||||
- { os: macos-latest, target: x86_64-apple-darwin }
|
||||
- { os: windows-latest, target: i686-pc-windows-gnu }
|
||||
- { os: windows-latest, target: i686-pc-windows-msvc }
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -296,7 +296,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "du-dust"
|
||||
version = "1.2.3"
|
||||
version = "1.2.4"
|
||||
dependencies = [
|
||||
"assert_cmd",
|
||||
"chrono",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "du-dust"
|
||||
description = "A more intuitive version of du"
|
||||
version = "1.2.3"
|
||||
version = "1.2.4"
|
||||
authors = ["bootandy <bootandy@gmail.com>", "nebkor <code@ardent.nebcorp.com>"]
|
||||
edition = "2024"
|
||||
readme = "README.md"
|
||||
|
||||
@@ -16,7 +16,7 @@ Because I want an easy way to see where my disk is being used.
|
||||
Study the above picture.
|
||||
|
||||
* We see `target` has 1.8G
|
||||
* `target/debug` is the same size as `target` - so we know nearly all the disk usage of the 1.5G is in this folder
|
||||
* `target/debug` is the same size as `target` - so we know nearly all the disk usage of the 1.8G is in this folder
|
||||
* `target/debug/deps` this is 1.2G - Note the bar jumps down to 70% to indicate that most disk usage is here but not all.
|
||||
* `target/debug/deps/dust-e78c9f87a17f24f3` - This is the largest file in this folder, but it is only 46M - Note the bar jumps down to 3% to indicate the file is small.
|
||||
|
||||
|
||||
@@ -28,3 +28,6 @@ ignore-hidden=true
|
||||
output-format="si"
|
||||
|
||||
number-of-lines=5
|
||||
|
||||
# To keep the .git directory collapsed
|
||||
collapse=[".git"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH Dust 1 "Dust 1.2.3"
|
||||
.TH Dust 1 "Dust 1.2.4"
|
||||
.SH NAME
|
||||
Dust \- Like du but more intuitive
|
||||
.SH SYNOPSIS
|
||||
@@ -170,4 +170,4 @@ Print version
|
||||
[\fIPATH\fR]
|
||||
Input files or directories
|
||||
.SH VERSION
|
||||
v1.2.3
|
||||
v1.2.4
|
||||
|
||||
@@ -38,6 +38,7 @@ pub struct Config {
|
||||
pub files0_from: Option<String>,
|
||||
pub number_of_lines: Option<usize>,
|
||||
pub files_from: Option<String>,
|
||||
pub collapse: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
@@ -177,6 +178,14 @@ impl Config {
|
||||
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())
|
||||
}
|
||||
|
||||
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 {
|
||||
|
||||
@@ -224,7 +224,7 @@ fn main() {
|
||||
indicator.spawn(output_format.clone())
|
||||
}
|
||||
|
||||
let keep_collapsed: HashSet<PathBuf> = match options.collapse {
|
||||
let keep_collapsed: HashSet<PathBuf> = match config.get_collapse(&options) {
|
||||
Some(ref collapse) => {
|
||||
let mut combined_dirs = HashSet::new();
|
||||
for collapse_dir in collapse {
|
||||
|
||||
Reference in New Issue
Block a user