Commit Graph

229 Commits

Author SHA1 Message Date
andy.boot 1f120de168 Run tests on /tmp directory 2020-03-28 16:07:35 +00:00
andy.boot c0048b2ae4 Handle running with bad parameter
Earlier refactor caused running with: 'dust -' to crash
2020-03-28 15:59:07 +00:00
andy.boot 402a8f8249 Remove thread parameter
Code to limit number of threads removed. ignore crate seems quite good
at using CPUs correctly
2020-03-28 15:59:07 +00:00
andy.boot 7cc7047b28 Move from assert_cli to assert_cmd
assert_cli is deprecated.
This allows us to use 'or' in the output of our integration tests
2020-03-28 15:06:40 +00:00
andy.boot 1953e107c2 Move everything to ignore instead of jwalk 2020-03-22 23:58:07 +00:00
andy.boot f096e82754 Merge pull request #81 from rivy/fix.cicd-features
Maint/CI ~ fix features option for GHA `cargo ...` and `cross ...`
2020-03-15 09:50:37 +00:00
Roy Ivy III c3415df4b1 Maint/CI ~ fix features option for GHA cargo ... and cross ... 2020-03-10 14:10:28 -05:00
andy.boot 9452049aff Increment version v0.5.1 2020-03-01 16:23:26 +00:00
andy.boot 09e3c27e70 Merge pull request #80 from bootandy/colours3
Rethink colors
2020-03-01 16:20:00 +00:00
andy.boot b0bfe654c4 Rethink colors
Use LS_COLORS to print default color of each file or folder

Keep showing largest sub folder in red.
2020-03-01 16:10:22 +00:00
andy.boot 6bc44de495 Merge pull request #74 from rasmushalland/win-perf
Avoid opening all files for reading on windows
2020-03-01 14:49:47 +00:00
Rasmus Halland efb455c739 Opening files on windows got a lot cheaper.
We avoid passing FILE_READ_DATA to CreateFile.
2020-03-01 14:41:21 +01:00
andy.boot 2c58041885 Clean up windows performance
Instead of generating random values for the drive and inode counter on
windows we return None instead
2020-03-01 14:41:21 +01:00
Rasmus Halland c30f31c22c Avoid opening all files for reading on windows
It can be very expensive to do that, especially when it causes windows defender to read the files and scan them.
2020-03-01 14:41:21 +01:00
andy.boot 59f2cdfb84 Merge pull request #79 from NeelChotai/colours
use LS_COLORS for largest subdirectories
2020-03-01 00:59:34 +00:00
Neel Chotai 795d91237d update args descriptions 2020-03-01 00:51:36 +00:00
Neel Chotai 26ae050f16 use LS_COLORS for directories 2020-03-01 00:51:32 +00:00
Neel Chotai 58b395e7ee fix compiler warning 2020-03-01 00:49:10 +00:00
andy.boot 3beb2b5274 Merge pull request #78 from bootandy/ab-fix-build
Maybe fix windows 8 support
2020-02-29 23:06:57 +00:00
andy.boot 19d938b05e Maybe fix windows 8 support
enable_ansi_support must be run for windows 10 but is not required and
indeed fails if run on windows < 10.

Disable the expect so the code might run on windows 8

may fix:
https://github.com/bootandy/dust/issues/70
2020-02-29 11:13:13 +00:00
andy.boot d4daa82297 Merge pull request #77 from bootandy/ab-fix-build
Ab fix build
2020-02-29 01:35:10 +00:00
andy.boot 21097578d9 Remove feature flag from build
The --features flag was empty which caused the build to fail. As the
features flag was not used it was removed.
2020-02-29 00:42:28 +00:00
andy.boot 069dc184a9 Merge pull request #73 from bootandy/readme
Update readme
2020-02-20 20:39:20 +00:00
andy.boot 02fa657128 Update readme 2020-02-20 20:36:35 +00:00
andy.boot bc0e376c88 New Version v0.5.0 2020-02-19 20:22:54 +00:00
andy.boot d7c602a2d2 Merge pull request #72 from bootandy/ab-redesign
Large redesign
2020-02-19 20:19:50 +00:00
andy.boot 603e6be7eb Large redesign
Use the whole width of the terminal assume width of 80 if none found

Show percentages in the final column. Show ASCII bars indicating usage
of the underlying directories in the space inbetween.

Display (height of terminal - 10) entries by default.

Reverse the output order so largest is at the bottom.

Break up tests. Change older tests to check real output of program.
2020-02-18 20:58:53 +00:00
andy.boot efa469e12f Merge pull request #67 from bootandy/ab-simplify-inodes2
Simplify inodes & devices by removing Option
2020-02-10 22:11:35 +00:00
andy.boot 657858df16 Simplify inodes & devices by removing Option
This code now won't compile on none-(windows/unix family)
systems. [unix family includes mac]

Removing this method allows us to remove an Option and simplify the code
slightly
2020-02-09 14:33:46 +00:00
andy.boot a8d700d530 Merge pull request #66 from bootandy/ab-refactor
Refactor code
2020-02-09 14:27:05 +00:00
andy.boot c408d8887d Update docs for -X flag.
-X flag changed subtly with previous pull request. It now requires a
directory name and doesn't work on substrings.
2020-02-09 14:10:53 +00:00
andy.boot be2250d241 Refactor: use if let instead of is_some 2020-02-09 14:10:53 +00:00
andy.boot b6aa1378de Fix bug for devices and apparent size
If apparent_size was set and ignore files on other devices was set then
the latter flat would not work.

Fix this bug
2020-02-09 13:57:08 +00:00
andy.boot 2082141dfc Add tests for should_ignore_file function
function currently has a bug that is highlighted by second test
2020-02-09 13:57:08 +00:00
andy.boot 8a9b5e889d Refactor path depth calculation
Factor out duplicate code,
Add comment explaining why filter is necessary (thanks to rivy)
2020-02-09 13:57:08 +00:00
andy.boot 871b7e90d8 Merge pull request #64 from rivy/rf.path
Refactor ~ use Path/PathBuf instead of &str/String
2020-02-09 13:52:11 +00:00
andy.boot edf300893c Increment version 2020-02-09 10:08:41 +00:00
Roy Ivy III a3d8fc00e1 Refactor ~ use AsRef<Path> where possible 2020-02-03 16:56:50 -06:00
Roy Ivy III 9d4531d48b Refactor ~ use PathBuf instead of String 2020-02-03 16:56:47 -06:00
andy.boot 75e419e7ed Update README.md
Remove section on performance, I can not replicate this and don't want to cause controversy.
v0.4.5.0
2020-02-03 20:54:19 +00:00
andy.boot 4a62fc5726 Update README.md
include dutree in alternatives
2020-02-03 20:52:12 +00:00
andy boot d2b959fdcf Merge pull request #62 from rivy/add.gha
Fix windows compilation and testing
v0.4.41
2020-02-03 20:31:37 +00:00
Roy Ivy III 36ebb1b2b0 refactor ~ strip_trailing_curdirs() -> normalize_path() (a more accurate descriptor) 2020-01-29 18:36:13 -06:00
Roy Ivy III e126a01096 Tests ~ improve portability of tests for 'Fix ~ improve portability of path manipulation' 2020-01-29 18:36:13 -06:00
Roy Ivy III 7a38a26593 Fix ~ (WinAPI) must use Handle::from_path_any() if target path might be a directory
.# [why]

"If you use `from_path()` on a directory, then subsequent queries using that handle will fail."
Instead, use `from_path_any()` which supports opening files or directories.

ref: "Struct winapi_util::Handle" from <https://docs.rs/crate/winapi-util>
2020-01-29 18:36:13 -06:00
Roy Ivy III 1af6e1f757 Tests ~ simplify by ignoring instead of skipping tests for 'Tests ~ disable two symlink tests which may not be possible on 'windows'' 2020-01-29 18:36:13 -06:00
Roy Ivy III affafcc5f2 Tests ~ simplify by ignoring instead of skipping tests for 'Tests ~ temporarily disable tests which vary by 'windows' hosts' 2020-01-29 18:36:13 -06:00
Roy Ivy III 26ef8c3e59 Tests ~ add test case to 'Fix ~ improve portability of path manipulation' 2020-01-29 18:36:13 -06:00
Roy Ivy III 0898ee6bf0 Maint/CI ~ temporarily disable non-working cargo tarpaulin test coverage 2020-01-29 18:36:13 -06:00
Roy Ivy III 5ac168868e Tests ~ temporarily disable tests which vary by 'windows' hosts 2020-01-29 18:36:13 -06:00