mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
clean up
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "dus"
|
name = "dust"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["bootandy <bootandy@gmail.com>"]
|
authors = ["bootandy <bootandy@gmail.com>"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
# dus
|
# Dust
|
||||||
a rust alternative to du
|
du + rust = dust. A rust alternative to du
|
||||||
|
|
||||||
|
unlike du, dust is meant to give you an instant overview of which directories are using disk space.
|
||||||
|
|
||||||
|
du is good when combined with sort and head. Dust is an all in one command.
|
||||||
|
|
||||||
do not use. strickly experimental for me messing around with rust.
|
do not use. strickly experimental for me messing around with rust.
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -8,8 +8,6 @@ extern crate ansi_term;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
|
|
||||||
use std::str::Split;
|
|
||||||
use std::collections::HashMap;
|
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
use ansi_term::Colour::Fixed;
|
use ansi_term::Colour::Fixed;
|
||||||
@@ -85,7 +83,12 @@ fn main() {
|
|||||||
.arg(Arg::with_name("inputs").multiple(true))
|
.arg(Arg::with_name("inputs").multiple(true))
|
||||||
.get_matches();
|
.get_matches();
|
||||||
|
|
||||||
let filenames: Vec<&str> = options.values_of("inputs").unwrap().collect();
|
let filenames = {
|
||||||
|
match options.values_of("inputs") {
|
||||||
|
None => vec!["."],
|
||||||
|
Some(r) => r.collect(),
|
||||||
|
}
|
||||||
|
};
|
||||||
let number_of_lines = value_t!(options.value_of("number_of_lines"), usize).unwrap();
|
let number_of_lines = value_t!(options.value_of("number_of_lines"), usize).unwrap();
|
||||||
|
|
||||||
let mut permissions = true;
|
let mut permissions = true;
|
||||||
@@ -285,9 +288,6 @@ fn display_node<S: Into<String>>(
|
|||||||
if node.dir.name.matches("/").count() == printable_node_slashes + 1 {
|
if node.dir.name.matches("/").count() == printable_node_slashes + 1 {
|
||||||
num_sibblings -= 1;
|
num_sibblings -= 1;
|
||||||
let tree_chars = {
|
let tree_chars = {
|
||||||
/*if num_sibblings == 0 {
|
|
||||||
" "
|
|
||||||
} else*/
|
|
||||||
if num_sibblings == 0 {
|
if num_sibblings == 0 {
|
||||||
"└──"
|
"└──"
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user