588 Commits

Author SHA1 Message Date
andy boot 3fb91a6c29 Merge pull request #19 from bootandy/rm_dup_input
code to remove duplicate arguments
2018-05-09 11:44:38 +01:00
andy.boot 51561994c5 Break up display_node function slightly
Also: run rustformat
2018-05-09 11:28:23 +01:00
andy.boot ce0e14bf00 Tweak output - the root node now has a: ─┬ 2018-05-09 10:58:32 +01:00
andy.boot dd75ec4aa7 wip: code to remove duplicate arguments
Also handle case where an argument is a substring of another argument
2018-05-09 10:35:30 +01:00
andy boot 65cd42736a Update README.md 2018-05-09 09:43:30 +01:00
andy boot 4792e97177 Merge pull request #18 from bootandy/fixes
Fixes
2018-05-02 09:51:21 +01:00
bootandy 3e9f09e339 Remove unnecessary path & pathbuf code 2018-05-02 00:42:03 +01:00
bootandy dba465a094 Tweak error message 2018-05-02 00:39:57 +01:00
bootandy 25d1ee7b43 Remove naked unwrap 2018-05-02 00:39:57 +01:00
bootandy 2556885622 Rust format 2018-05-02 00:39:57 +01:00
bootandy 8c088a7026 Fix: Passing a string into -n will no longer panic
fixes: #https://github.com/bootandy/dust/issues/16
2018-05-02 00:39:57 +01:00
bootandy 39db8b86fd Replace simple match with map_or 2018-05-01 14:38:34 +01:00
bootandy c5830c5d00 Stop using target_os just use target_family
target_family unix covers linux and mac and wraps up the call for inodes
in a common interface.
2018-05-01 13:59:48 +01:00
bootandy b68c450710 use eprintln! 2018-05-01 13:55:19 +01:00
andy.boot 6e2e5761d8 Increment version 2018-04-27 12:46:27 +01:00
andy boot 6842526d2c Merge pull request #15 from bootandy/depth2
Add support for -d depth flag
2018-04-27 12:28:15 +01:00
andy.boot 4ac85d7dc9 Simplify tests
dust sort is now more predictable as it orders first by size and second
by name.

Walkdir still gives different iteration orders on different systems so
all output is not entirely predictable
2018-04-27 11:35:47 +01:00
andy.boot 8170a07886 Increase default to 20 from 15
Clean up README a bit.
2018-04-27 10:23:20 +01:00
andy.boot 0f1f823736 Add long options to cmd line params 2018-04-27 10:15:30 +01:00
andy.boot e6c777fb8b Add support for -d depth flag
Following a user request the option '-d N' allows a user to output N
levels of sub directories.

Fixed bug: so that trailing slashes are now removed.
2018-04-27 10:01:41 +01:00
andy boot 0bded9698a Merge pull request #14 from bootandy/fix_mac
Fix tests on mac
2018-04-24 17:09:30 +01:00
bootandy c7f0ea59f0 Fix tests on mac
Macos does not appear to have a predictable iteration order of the files
2018-04-24 16:50:37 +01:00
andy boot 6d62cfb9ae Merge pull request #13 from bootandy/walkdir2
Rewrite to use walkdir instead of recursion
2018-04-24 15:41:51 +01:00
andy.boot 803934d84b By default only print last leaf of path
Fixes #9
https://github.com/bootandy/dust/issues/9

Instead of printing the all sub tree leaves only the last leaf is now
printed. See readme change for example

The flag '-p' was added to print the sub tree the old way
2018-04-24 14:54:11 +01:00
andy.boot 24c97ef92f Rewrite to use walkdir instead of recursion
Advised to use walkdir by burntsushi as using recursion on file systems
can blow the stack.

walkdir is slower but allows the code to be cleaner and more reliable

Also experimented with ignore but locking the hashmap resulted in
similar performance to walkdir but with much uglier code.
2018-04-24 14:53:47 +01:00
andy boot 270edf0a76 Update README.md 2018-04-18 13:49:05 +01:00
andy.boot 0c5b08e1d2 Change package name to du-dust
The binary is still called dust. Sadly dust was taken on crates.io.
This change should allow us to send this crate to crates.io
v0.2.3
2018-04-18 13:40:52 +01:00
bootandy 35aef4c837 Add Cargo.lock 2018-04-16 23:09:04 +01:00
andy boot 95e7bb01eb Update README.md 2018-04-16 23:08:19 +01:00
andy boot 247e55788a Merge pull request #6 from Infinisil/unignore-lockfile
Don't ignore Cargo.lock
2018-04-16 22:54:07 +01:00
Silvan Mosberger bcab66ab8b Don't ignore Cargo.lock
See https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries
2018-04-16 16:55:12 +02:00
andy boot 2c87a21da1 Merge pull request #5 from bootandy/refactor_orig
Refactor code
2018-04-07 17:17:54 +01:00
bootandy 74b9178017 Refactor code 2018-04-07 17:14:06 +01:00
andy boot 2eb1633b77 Update README.md 2018-04-07 11:53:55 +01:00
andy boot 3fd274ab36 Update README.md 2018-04-07 11:42:18 +01:00
andy boot f3ab902811 Update README.md 2018-04-07 11:38:21 +01:00
bootandy b3b1a867c4 Fix tests on CI
Files do not appear in predictable order - this order differs on
different versions of linux :-(.
2018-04-07 11:03:31 +01:00
bootandy 32561ecb18 Fix tests for linux 2018-04-07 10:23:47 +01:00
bootandy 2fe3943ed5 Update readme v0.2.2 2018-04-06 21:07:13 +01:00
bootandy b8ad44b7f0 increment version 2018-04-06 20:49:22 +01:00
bootandy 1a34bc3198 Integration tests
Several tests for recursive dirs, hard & soft links.
Tests use the tempfile project.

Personally I find the tests hard to read. Am considering adding a
'--no-color' output option as this will make the tests much more
readable. (Currently we have to call format_string to get the matching
colors and if a test fails the diff is very hard to read).
2018-04-06 20:44:02 +01:00
bootandy 385ddb75e1 Minor code neatening 2018-04-06 20:35:00 +01:00
bootandy 5c6165da8a First integration test
This test needs neatening but it is the first example of a working
integration test
2018-04-05 14:45:04 +01:00
bootandy f39b09e79c increment version (0.2.1 already tagged) 2018-04-05 14:45:04 +01:00
bootandy 778dbb44b3 Remove graying background
Remove background that gets grayer.
1) This looks funny on terminals that aren't black
2) Makes testing easier
2018-04-04 23:12:00 +01:00
bootandy 69c79d5f95 Update readme 2018-04-04 20:21:59 +01:00
bootandy 61ab0e8f96 Simplify build.
Just build mac and linux.
Remove appveyor file which was designed for windows.
v0.2.1
2018-04-03 20:54:53 +01:00
bootandy 285fd62850 increment version v0.2.0 2018-04-03 19:53:37 +01:00
bootandy 6a63cbe1bc fix: Dust was supposed to take multiple dir args
Dust will now work when given multiple dirs. Before this fix it would
only show the largest dir.
2018-04-03 17:54:45 +01:00
bootandy 8d98171b82 Update README 2018-04-03 17:17:04 +01:00