mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[PR #275] [MERGED] Implemented a progress indicator #396
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/bootandy/dust/pull/275
Author: @NovaliX-Dev
Created: 11/9/2022
Status: ✅ Merged
Merged: 1/14/2023
Merged by: @bootandy
Base:
master← Head:master📝 Commits (10+)
ec1204fv1.03c4a881renamed operations to be more clearce38061put info later because there is still operations par of the preparing process54ec016updated the last line clearingf110befchanged name of module and structs to ones that make more sensebf3263Disable size computation when file_count option is set8f9c2e5added sleep during the thread waitingdfaff2buse 1024 powered instead of 10 to compute showed numberfff6d91include DS_Store9d81bb7added files directories skipped information📊 Changes
13 files changed (+442 additions, -14 deletions)
View changed files
📝
.gitignore(+4 -1)📝
completions/_dust(+2 -0)📝
completions/_dust.ps1(+2 -0)📝
completions/dust.bash(+2 -1)📝
completions/dust.elv(+2 -0)📝
completions/dust.fish(+1 -0)📝
src/cli.rs(+6 -0)📝
src/config.rs(+4 -0)📝
src/dir_walker.rs(+87 -8)📝
src/display.rs(+1 -1)📝
src/main.rs(+38 -2)➕
src/progress.rs(+292 -0)📝
tests/tests_symlinks.rs(+1 -1)📄 Description
When dust is performing on a large set of file, it doesn't print anything to the terminal, which can confuse the user.
That's why i've implemented a small indicator. For the moment it doesn't show up if the process last less than 2 seconds (the timing is started at the indexing, because it's the operations that takes most of the time). If showed, it prints 3 things :
It can show two operations : Indexing, and Preparing. When in Indexing, it shows the number of file indexed and the total size of them (the size is based on node's information). Preparing state is set after Indexing, when the nodes are cleanup and filtered before computing the output.
When the indicator is stopped, it returns the output, just in case you want to use them.
I'm pretty sure there are things that are not done in the best way, and i'll change them if requested, but for now i just wanted your opinion on this small feature.
I've also added a modification to your
.gitignorefile. You can reject it as well.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.