Commit Graph

20 Commits

Author SHA1 Message Date
wugeer f48fcc790a feat: support Dust tree by age 2024-08-07 19:31:22 +01:00
andy.boot 1ab0b2f531 refactor: rename variable 2024-07-17 19:35:44 +01:00
andy.boot 7d13fe972c refactor: DisplayData 2023-02-04 11:20:50 +00:00
andy.boot 5a3e15d0ce refactor: simplify filter.rs 2023-02-04 11:20:50 +00:00
andy.boot 1495251ebc feature: --files-only -F
Add feature to only show files skipping directories.
2023-01-29 09:34:40 +00:00
andy.boot a3ab5bfe0f refactor create AggregateData for filter.rs 2023-01-07 14:16:03 +00:00
andy.boot 04c4963a02 refactor filter.rs 2023-01-07 14:16:03 +00:00
andy.boot 40a6f098ae refactor filter.rs 2023-01-07 14:16:03 +00:00
andy.boot 5e607cf210 Fix: depth=0 bug for multiple arguments
https://github.com/bootandy/dust/issues/282
2023-01-05 09:22:38 +00:00
DIRE 2ca7177446 FEATURE: support only directories will be displayed. Flag -D 2022-10-05 23:26:10 +01:00
andy.boot d6f9bb3c47 Feature: Add min-size parameter
Add often requested feature. '--min-size 50000' will only include files
above a size of 50kB
2022-08-23 11:47:18 +01:00
andy.boot cf5ebd76fe Refactor: Reintroduce local variable 2022-08-20 11:09:56 +01:00
andy.boot fc548919c5 Refactor: Move filter by file type to new file 2022-08-20 11:09:56 +01:00
Nathan West 282f6d314d get_new_root no longer panics if there are 0 nodes 2022-08-20 10:50:46 +01:00
Nathan West c36ca33fe9 Lots of code cleanup
- Try to use iterator adapters and collect in various places, where possible. This especially benefits draw_it.
- Try to use `.map` and other similar methods on Options and Results, where possible
- Replaced nearly all clones with reference-based equivalents
- Summarizing nodes by file extension is now much more efficient
- PartialOrd and PartialEq implementations now agree
- Replace #[cfg(...)] function definitions with simpler if cfg!(...) equivelents
- Simplify CLI Values handling by taking advantage of Values::default
- Various spelling corrections in comments
- Add `ColorState` enum to replace bool, for clarity
- Fix tests that break under some detected terminal widths when paths are long
- Use sort_by instead of (sort, reverse)
- Use new `ExtensionNode` struct internally to simplify extension aggregation code
2022-08-20 10:50:46 +01:00
andy.boot fc70f9ba30 Rename variable 2022-07-13 09:38:21 +01:00
andy.boot a00d1f0719 Fix: Allow -n to be used with -d
Allow -n for number_of_lines to be used with -d 'max depth'

Remove depth specific functions, the job is now handled by the mainline

Add depth as a field onto the Node object.
2022-07-13 09:38:21 +01:00
andy.boot 9d2e6d2b36 Feature: Filter by invert_filter: reverse match
Mimic grep's -v option.

Allows dust to only match files that do not match the given filter
2021-09-19 11:12:23 +01:00
andy.boot 124c19b5c9 Feature: Adding file types filter & F flag changed
-t = Show summary of types

-e = Filter by regex
	allows you to specify a file type like -e "\.txt$"

Change behaviour of '-f' flag - it now counts only files. Before it
counted files & directories. This was needed for compatibility with
the new '-e' filter flag
2021-09-19 11:12:23 +01:00
andy.boot 00c7ce8f15 Large refactor. Use rayon, 10X performance boost
Code changes:
Removed ignore & channel crates. Using a single reciever thread to build
a hashmap to prevend duplicate inodes being reported gave a severe
performance penalty

Using rayon crate with some hand crafted file traversal has improved
performance aprox 10X

Behaviour changes:

Removed parameter 'limit by filesystem' - don't think this is used, and
I only added it as it was easy to add with the ignore crate.

Sym links will now not appear in the output tree unless using '-s'
'apparent-size' flag

Change behaviour of multiple args so that it unifies them and
compares them under one tree instead of treating them
individually: https://github.com/bootandy/dust/issues/136
2021-06-22 12:20:48 +01:00