558 Commits

Author SHA1 Message Date
andy.boot dbd18f90e7 docs: update release procedure
Previously I accidentally tagged a release before building it leading
to an out of date Cargo.lock file.
v1.1.1
2024-07-17 19:35:44 +01:00
andy.boot dad88ad660 version: increment version 2024-07-17 19:35:44 +01:00
andy.boot 00a7c410a0 ci: fix warning in windows build 2024-07-17 19:35:44 +01:00
andy.boot 1ab0b2f531 refactor: rename variable 2024-07-17 19:35:44 +01:00
andy.boot c09073151d fix: perf issues with v1.1.0
Bring performance back
2024-07-17 19:16:46 +01:00
andy.boot b4a517a096 version: update version
Also update docs, so I don't partially update a version number again
2024-07-16 22:48:27 +01:00
andy.boot e654d30f9d version: increment version 2024-07-16 22:05:17 +01:00
Maksim Bondarenkov 4fc1897678 deps: update winapi-util to 0.1.8 (#410) 2024-07-03 21:41:52 +01:00
andy.boot 08b9c756ee fix: total_ordering of sort_by_inode
Before sort_by_inode could result in unstable ordering. This change
ensures we will always have a reliable total ordering
2024-06-30 21:57:58 +01:00
n4n5 394231683d feat: Add flag to read from file/stdin (#405)
* from standard

* improve

* happy clippy

* explicit arg option

* fix problem
2024-06-27 23:51:47 +01:00
Jan Chren ~rindeal a06a001886 test_exact_output: simplify array handling 2024-06-27 21:47:18 +01:00
Jan Chren ~rindeal fd9e97bcfa test_exact_output: refactor unreadable directory handling 2024-06-27 21:47:18 +01:00
Jan Chren ~rindeal 3ed95ee399 streamline func APIs processing target_dirs 2024-06-27 21:47:18 +01:00
Jan Chren ~rindeal 58c9f6d509 Fix -x option behavior
This PR addresses an issue where `target_dirs` were being optimized out\
before being passed to the `get_filesystem_devices()` function.
The changes in this PR ensure that `target_dirs` are passed directly
to `get_filesystem_devices()`, and only then are they simplified.

Example of a command that currently doesn't work correctly:
```sh
dust -x $(findmnt -S tmpfs -o target -n)
```

It should show the usage of all tmpfs mounts, but it currently shows
just the the root mountpoints like `/run`, since all the mountpoints
nested under it are optimized out.
2024-06-27 21:47:18 +01:00
wugeer 3f2f7a8bb2 Formatting 2024-06-27 21:11:11 +01:00
andy.boot b7176cf887 tests: Cleanup test_exact_ouput 2024-06-24 23:36:09 +01:00
wugeer d65f41097e feat: Added the ability to filter the corresponding files based on the access time, modify time, and change time of the file for statistics 2024-06-24 23:35:25 +01:00
n4n5 08e4240b41 add cli 2024-06-19 21:48:55 +01:00
n4n5 028ca1fdc7 eprint problematic folders 2024-06-19 21:48:55 +01:00
andy.boot 4f6255971b refactor: cleanup -j / --output-json flag
Stop -j writing to a file, print to stdout instead.
2024-06-19 21:39:09 +01:00
andy.boot cab250aa0e tests: Fix test broken in prev commit 2024-06-18 23:43:58 +01:00
wugeer 5f76db27c9 fix: issue 386 --only-file displays full paths even without --full-paths 2024-06-18 23:25:31 +01:00
wangweijie a34e78f912 deps: bump libc from 0.2.153 to 0.2.155
Signed-off-by: wangweijie <wangweijie@loongson.cn>
2024-06-18 23:18:16 +01:00
binlingyu 1ffda38264 Explicit lifecycle that can be omitted 2024-06-17 21:50:24 +01:00
andy.boot e78690e4f5 chore: Cleanup threads commit 2024-05-06 20:26:02 +01:00
andy.boot 5b87260467 feat: Adding threads flag
Thanks: Dj-Codeman
2024-05-06 20:26:02 +01:00
Fukushima Shogo 2c34c38b29 Formatting 2024-05-02 23:03:41 +01:00
Fukushima Shogo a1574d6a06 Formatting 2024-05-02 23:03:41 +01:00
Fukushima Shogo 184ea1f956 Added json output function 2024-05-02 23:03:41 +01:00
andy.boot a3dcab9454 fix: si detection - single digits are binary 2024-05-01 20:42:04 +01:00
andy.boot 658b11d0f8 fix: bug: Si detection was backwards.
kB - means kilobyte 10**3
KiB - means kibibyte 1024 / 2**10

https://en.wikipedia.org/wiki/Byte#Multiple-byte_units
2024-05-01 20:42:04 +01:00
Taro Tanaka e2fe656296 Redo 'Fix zsh completion' with clap
Because I'm not familiar with Rust, when I was working on
https://github.com/bootandy/dust/pull/390 I didn't realize that the
completions were auto-generated via clap. I'm sorry. This redoes it
with clap.

This improves not only the completions but also the --help and the
man page. Also the --output-format flag will raise an error if the
given value is invalid.
2024-05-01 20:19:58 +01:00
Taro Tanaka 87581f328e Allow options to be set in any position
Currently options following regular arguments are not interpreted as
options. This fixes that.

Users can still treat values starting with a hyphen (`-`) as regular
arguments by using `--`, e.g.:

    dust -d 2 -r ~/Documents -F -- --this-is-my-dir
2024-05-01 20:16:37 +01:00
Taro Tanaka ecd6b85c17 Fix zsh completion
- Use `_files` to complete file paths
- Add `_dust_output_formats` for -o/--output-format
- Add missing headings

Fixes https://github.com/bootandy/dust/issues/359
2024-04-26 21:20:14 +01:00
andy.boot b86e5c8c88 version: increment version 2024-03-25 22:47:03 +00:00
andy.boot 25c016f98a cargo update 2024-03-25 22:01:08 +00:00
andy.boot 69c4c63357 fix: windows clippy 2024-03-25 22:01:08 +00:00
n4n5 fbd34ec4c2 Better handling for color in terminal (#381)
* better handling for color in terminal

* cleanup

* cleanup

* cargo fmt

* clippy + tests

* clean
2024-03-25 21:50:29 +00:00
andy.boot 7c75c1b0a9 Update README.md
https://github.com/bootandy/dust/issues/380
2024-03-25 21:38:12 +00:00
andy.boot b54a215805 feat: Listen for ctrl-c
before ctrl-c would not cancel a running job.
2024-03-25 21:33:40 +00:00
Zeitsperre 0364cf781e Add Anaconda install method 2024-03-17 21:19:50 +00:00
andy.boot a8bf76cb22 refactor: minimum-size & output-format
share code for handling kb/kib/mb/mib logic
2024-03-14 20:30:03 +00:00
andy.boot 4df4eeaa38 refactor: minimum-size
Change so it ignores the 'si' flag of output. But allow it to work with
kib/kb/mib/mb etc
2024-03-14 20:30:03 +00:00
andy.boot ebb3b8cceb refactor: merge --si and --display-kb
add new option: --output-format this controls how the output is
summarised and takes:

 nothing = default behaviour
 si = SI units (same as old --si flag)
 b = bytes
 kb = kb
 kib = si kb
 mb = mb
 mib = si mb
....etc
2024-03-14 20:30:03 +00:00
zhaotao1 e9bacdf875 feat: display the size of a file or directory in "kilobytes"
feat: display the size of a file or directory in "kilobytes"
2024-03-14 20:30:03 +00:00
pandaninjas a4b5d8573b feat(win): use size on disk for apparent size for OneDrive files (#370)
* feat(win): use size on disk for apparent size for OneDrive files

* apply changes from code review

* run cargo fmt
2024-02-24 15:05:11 +00:00
andy.boot 4a2778b6ea dependency: cargo update 2024-02-21 23:42:30 +00:00
andy.boot 7ee744207b tests: fix test test_apparent_size
my 'many' line is: 4.0K   ┌─┴ many        │ the characters 4.0K are 4 chars.

photosheep's space for 'many' is '44B' which is 3 chars and so my system
needs 1 more char. Hence there is one more space character padding
floating round.
2024-01-29 22:41:42 +00:00
andy.boot 96068518f6 tests: Print to stderr when test fails 2024-01-29 22:41:42 +00:00
andy.boot 10168e0a47 cargo update 2024-01-29 22:41:42 +00:00