Commit Graph

483 Commits

Author SHA1 Message Date
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
andy.boot 6768df9a7b Increment version 2024-01-09 23:16:16 +00:00
andy.boot e80892a9e7 feat: better error messages
Provide "No such file or directory" error if file is not found.
Provide "Unknown Error" if other error found

Should reduce confusion from the generic other error
2024-01-09 23:02:01 +00:00
andy.boot cd53fc7494 feat: new param: ignore-all-in-file
Add new cmd line param to ignore all files or directories listed in this
file
2024-01-03 22:24:23 +00:00
andy.boot e8c7990a17 feat: Custom stack size
If a user reports a crash from stacksize - we can try different stack
memory sizes to try and figure out the cause.

Do not try and initialise rayon on 32 bit builds

Fix rayon initialisation, may not have been called before due to badly
formed closure
2024-01-03 21:46:05 +00:00
andy.boot c8b61d2f46 dependency: upgrade to clap 4 2023-12-11 23:07:54 +00:00
andy.boot 6e0505bfd7 feat: Reverse direction of bars
Add bars on right option

Add tests
2023-11-23 22:34:24 +00:00
Ylarod 24bdbf036e Rename back to README.md 2023-11-23 22:29:16 +00:00
andy.boot 29085686e1 docs: update README.md
Add note about config file. 

Pre-emptively include the new --bars-on-right flag.
2023-11-21 22:03:00 +00:00
andy.boot 8b1632dde8 docs: Fix filecount docs
We count files not files + folders
2023-11-21 21:24:43 +00:00
andy.boot f3275cd59c README.md: Add link on build button 2023-11-09 23:31:37 +00:00
andy.boot 939ed89ebb typo: README.md 2023-11-09 23:27:42 +00:00
andy.boot a58e5f48f6 fix: README.md
Fix link to CI build.
2023-11-09 23:27:23 +00:00
andy.boot 3f9014d8c7 feat: No progress bars if stdout redirected
Progress bars pollute the output if it has been redirected to a file.

If stdout is redirected do not print progress bars
2023-11-09 23:23:05 +00:00
andy.boot 7c54d41ace dependency: remove atty
Read input from clap
2023-11-09 23:23:05 +00:00
andy.boot 2fa14ca19c cargo update: update dependencies (#341) 2023-11-06 23:21:13 +00:00
simonsan 211d89e634 Add scoop install for Windows (#337) 2023-11-06 22:17:44 +00:00
wickles 0038cb24b4 Fix filename completions for zsh and bash (#331) 2023-07-14 18:32:21 +01:00
andy.boot 658f8d2e2b ci: Add musl arm build
ci: Add musl arm build
2023-05-07 11:50:49 +01:00
andy.boot 2c23336794 Increment version
Request for security fix
https://github.com/bootandy/dust/issues/324
2023-05-05 20:40:52 +01:00
andy.boot a4ae013459 cargo update: update dependencies 2023-05-05 20:40:52 +01:00
JCallicoat c259d3b566 Add support for cargo-binstall to Cargo.toml
Add support for cargo-binstall to find github release builds.
2023-04-02 20:42:26 +01:00
andy.boot bdfd3c01a5 cargo update: update dependencies 2023-03-14 20:59:31 +00:00
andy.boot 2fe91806c7 Increment version v0.8.5 2023-03-14 08:18:23 +00:00
andy.boot 514bb2799c Fix: some panics are occuring when creating rayon
Wrap and ignore these panics.

I can't reproduce this problem but I'm curious to know if this fixes it
2023-03-14 08:15:19 +00:00
Efertone e17a1af476 remove depth from config.toml and fix style issues
Signed-off-by: Efertone <efertone@pm.me>
2023-03-06 21:43:15 +00:00