Commit Graph

339 Commits

Author SHA1 Message Date
andy.boot 42163abb73 Cargo: Remove num_cpus library. Ran update
Not needed since v0.6.0
Ran cargo update
2021-07-07 18:35:05 +01:00
andy.boot 8e0188c755 README: Update usage examples of dust 2021-07-07 18:35:05 +01:00
andy.boot 555d86206d ci: update versions of ubuntu 2021-06-23 10:05:48 +01:00
andy.boot 02392881c5 Update version 2021-06-23 09:40:58 +01:00
andy.boot 6f1175ef8d README: Add another tool to list of alternatives 2021-06-23 09:40:58 +01:00
andy.boot 1d062cf683 README: Remove -x option
This behaviour was removed in previous commit
2021-06-23 09:40:58 +01:00
andy.boot be7a9181b2 Add alternative tools 2021-06-22 13:13:51 +01:00
andy.boot 9dcd4d0de4 Merge pull request #149 from bootandy/rewrite
Large Rewrite
2021-06-22 13:09:58 +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
andy.boot c4a73d5921 Merge pull request #147 from QuarticCat/master
Beautify help messages
2021-06-08 10:40:34 +01:00
andy.boot e1ffc92589 Merge branch 'master' into master 2021-06-08 10:24:31 +01:00
andy.boot 18729762ad Fix style for new version of clippy 2021-06-08 10:20:23 +01:00
ttay 8a499201de Updated crossbeam-channel to 0.5 and ran Cargo update 2021-06-08 10:11:11 +01:00
QuarticCat 551c5d3bfa Simplify conflict implementation 2021-06-05 21:09:31 +08:00
QuarticCat 15a867636f Add wrap_help feature to clap 2021-06-05 20:39:59 +08:00
andy.boot 1b3d0b2724 Update packages 2021-01-16 15:42:39 +00:00
andy.boot d5fa7f0861 Increment version 2021-01-16 15:42:39 +00:00
andy.boot e15cf0c42e [core] New flag: width
Add support for width flag
https://github.com/bootandy/dust/issues/126

Requested because some people may cat the output

All terminal height/width detection is now in the main file. One method
now has too many args for clippy, this complaint is valid and in the
future we should consider pulling these out into a separate object.
2021-01-16 15:42:39 +00:00
andy.boot 1891de7fa3 Notes on how to publish 2021-01-16 15:42:39 +00:00
Alexandru Macovei 998e7fb2f8 Address clippy lints 2021-01-16 14:56:14 +00:00
Alexandru Macovei a48c7782ac Print correct message when paths are not found 2021-01-16 14:56:14 +00:00
andy.boot e0347b0b43 Fix: Stop adding extra output lines for multi args
If we provided n names we would previous output screen_height + n lines.
This is wrong. We should only print screen_height lines
2020-11-25 13:46:48 +00:00
andy.boot 5b6b449cbd Upgrade packages 2020-11-25 13:46:48 +00:00
andy.boot c8568e5674 Code cleanup from previous commit 2020-10-21 22:16:40 +01:00
Tyler Bailey 9d13994526 Cleanup (#121)
* remove unneeded identity .map()

* remove redunant field name in struct

* impl num_siblings for Node

* replace nested if w/ match in get_tree_chars

* remove unneeded field name in struct

* remove redundant println! & logic in display_node

* make get_children_from_node a Node method

* Revert "remove redundant println! & logic in display_node"

This reverts commit 40777025d5.
2020-10-21 22:01:18 +01:00
Sylvestre Ledru ca8b1efc18 Be less prescriptive for the ansi_term dep 2020-10-08 23:04:54 +01:00
oToToT c261492325 encode non-printable characters
use stfu8 to encode utf-8 characters
2020-10-08 22:57:01 +01:00
Thomas Gotwig 8d43185439 Publish on Homebrew on Linux 🍺🐧🎉 2020-10-03 09:42:27 +01:00
andy.boot 1d018bc80b Add test to check behaviour of -d flag
Covers the case fixed by the previous commit
2020-09-03 22:17:39 +01:00
andy.boot 2319c3032f Increment version for new release 2020-09-03 21:58:27 +01:00
Ryan Winograd 53af0d486d Change behavior of depth flag
Change the depth flag so that it only changes the depth of displayed
subdirectories, not the depth of the directory size calculation (i.e.,
changing --depth does not change the displayed directory size, rather it
only changes how many levels of subdirectories are shown).
v0.5.3
2020-09-03 21:47:52 +01:00
andy.boot b643abe05e Refactor tests.
Split tests up into 2 files, 'exact output match' and 'substring ouput
match'
2020-09-03 00:04:27 +01:00
andy.boot 695c9b6747 Add test to check number of files flag 2020-09-03 00:04:27 +01:00
andy.boot 8e8f18b9bc Rename test_dir3 to test_dir_unicode
This better represents what it is trying to test
2020-09-03 00:04:27 +01:00
andy.boot e767be217a Add test for hidden flag 2020-09-03 00:04:27 +01:00
andy.boot 9187cb8ad2 Fix dumb test bug
dir_substring is in the test_dir2 folder not the test_dir3 folder
2020-09-03 00:04:27 +01:00
andy.boot 873456eb97 Add Hide hidden flag
From feature request to respect the .gitignore file. Decided to bundle in
respect for hidden files into the same feature [otherwise if you obey
the .gitignore file you still endup showing the .git directory]
2020-09-03 00:04:27 +01:00
andy.boot 4e1180e502 hack 2020-08-30 10:39:03 +01:00
andy.boot 4ea8d9339e Support listing directories by number of files
Based of https://github.com/bootandy/dust/pull/104

Idea is to allow users to find the number of files in each directory
instead of size.
2020-08-30 10:39:03 +01:00
andy.boot 82237c6bde Use full width of terminal (extra 2 characters)
Make output 2 characters wider to use the full width of terminal
2020-08-19 00:30:46 +01:00
andy.boot 109df305a3 Upgrade packages 2020-08-18 23:12:28 +01:00
andy.boot d03a9796f4 Refactor display code
Pull out parts into separate functions
2020-08-18 23:12:28 +01:00
andy.boot 8e591f3dd5 Move test directories into test dir 2020-08-18 23:12:28 +01:00
andy.boot 086f11988c Remove stray printlns 2020-08-18 23:12:28 +01:00
andy.boot 52eca1ff78 Change bar graphs
Change bars so we always show 'correct' length for current row this
means we ignore the parent's level
2020-08-18 23:12:28 +01:00
andy.boot e80c60b027 Do not print filenames that are too long
https://github.com/bootandy/dust/issues/92

Not 100% sure if this code is clean yet, may well be a better way to do
it

Also:
Added test directory with incredably long name as test case.

Update test_symlinks.py for mac runners. Mac test runners create files
with very long names, hence the tests fail periodically unless they look
for a truncated name with '..' at the end.
2020-08-16 21:19:15 +01:00
andy.boot e118814684 Tests: Remove any entries in existing tmp dir
Delete the existing dir before copying the new dir over it incase its
contents have changed.

Delete & Copy directories before tests are run.

On test runners the tests run in parallel so we can't write and clean
up at the start and end of each test. Unless each test copys the data to
a unique dir name. [This may be a better thing to do in the long run]
2020-08-16 21:19:15 +01:00
andy.boot 1546cf2eba Update README.md
Fix link to packages.
2020-08-13 09:36:25 +01:00
andy.boot 4f06de8044 Notes on how to publish
Install new release locally before pushing
Noted here because I forget how to do this
v0.5.2
2020-08-02 14:26:33 +01:00
andy.boot 2ca6fcc9ce Increment version 2020-08-02 14:26:33 +01:00