https://github.com/bootandy/dust/issues/46
Add -X flag used to ignore any file or directory that matches the
provided substring.
This means that -X e will ignore any file or directory with an 'e' in
it.
Force dust to use 2 threads if there is only 1 cpu
JWalk breaks if it tries to run on a single cpu
https://github.com/jessegrosjean/jwalk/issues/15
This is a hack because I can't figure out how to fix JWalk.
This code and the num_cpu crate can be removed when the bug is fixed
Also I have conflated cpus with cores while describing this issue. It is
very difficult to test as I don't have a single core machine.
Removes unwrap and returns a Result instead of panicing if an invalid
path is given.
Previously if the flag: '-x' was provided with an argument of an
invalid directory the code would crash here
https://github.com/bootandy/dust/issues/50
Add optional -x flag to limit search to the current filesystem.
Add (untested) support for windows for the equivalent of inode and
device.
* Initialize ansi_term if we're on windows
* Silence build warning on non-unix targets
* Update ansi-term which has windows specific fixes (and assert_cli while I'm at it)
New assert_cli library requires we cast the param passed to 'is()' as
it can no longer cast implicitly. I am guessing this is because it is
due to confusion between whether to cast to u8 or str
Make use of the 'is' more to test the entire output.
Add test for no_color mode.
Replace several calls to format_string with calls that build a string
directly. I feel format_string is becoming unweildly and this simplfies
the tests
When one directory was a substring of another the directory would appear
as a subdirectory instead of a sibling
Fixed originally by this: 6e03dd77e6
Broken by this: db6c8a019d
Added integration test as this has bitten me before
Following the large refactor on the previous commit, this commit fixes
the reverse functionality.
Depth detection moved into the tree building instead of being calculated
when drawing the tree to screen
WIP
Replace array of (string, int) pairs with tree of nodes.
A tree of nodes more accurately represents the underlying file structure
and hence is a better fit for the problem space.
Regression: Reverse doesn't work in this commit.
I suspect more methods can be simplifed and reduced.