[PR #275] [MERGED] Implemented a progress indicator #396

Closed
opened 2026-06-08 11:27:51 +03:00 by zhus · 0 comments
Owner

📋 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: masterHead: master


📝 Commits (10+)

  • ec1204f v1.0
  • 3c4a881 renamed operations to be more clear
  • ce38061 put info later because there is still operations par of the preparing process
  • 54ec016 updated the last line clearing
  • f110bef changed name of module and structs to ones that make more sens
  • ebf3263 Disable size computation when file_count option is set
  • 8f9c2e5 added sleep during the thread waiting
  • dfaff2b use 1024 powered instead of 10 to compute showed number
  • fff6d91 include DS_Store
  • 9d81bb7 added 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 :

  • A rolling thing, to indicate that the program doesn't freeze
  • The operation
  • Some more infos if needed

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 .gitignore file. You can reject it as well.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bootandy/dust/pull/275 **Author:** [@NovaliX-Dev](https://github.com/NovaliX-Dev) **Created:** 11/9/2022 **Status:** ✅ Merged **Merged:** 1/14/2023 **Merged by:** [@bootandy](https://github.com/bootandy) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`ec1204f`](https://github.com/bootandy/dust/commit/ec1204f218810c2277cd8f5f1fba01152a88c6ab) v1.0 - [`3c4a881`](https://github.com/bootandy/dust/commit/3c4a881158995cedaa938eae5f964ded940bf4ec) renamed operations to be more clear - [`ce38061`](https://github.com/bootandy/dust/commit/ce38061b4eba9554ba26e5225dff7e50fa94b426) put info later because there is still operations par of the preparing process - [`54ec016`](https://github.com/bootandy/dust/commit/54ec016caba1a42a625ebfa6d4b516ea7e317cbd) updated the last line clearing - [`f110bef`](https://github.com/bootandy/dust/commit/f110bef533d1e24f2f2879b496dd819fe146c5ef) changed name of module and structs to ones that make more sens - [`ebf3263`](https://github.com/bootandy/dust/commit/ebf326353465eccff2ca317007eace4bc035bc78) Disable size computation when file_count option is set - [`8f9c2e5`](https://github.com/bootandy/dust/commit/8f9c2e57e90ca510e900d789c26638a69a7edcc0) added sleep during the thread waiting - [`dfaff2b`](https://github.com/bootandy/dust/commit/dfaff2b7dd85bf2f0976c870bf46b9ce9baf0044) use 1024 powered instead of 10 to compute showed number - [`fff6d91`](https://github.com/bootandy/dust/commit/fff6d918434d1f2481f536c86fc3b2208b3eb03f) include DS_Store - [`9d81bb7`](https://github.com/bootandy/dust/commit/9d81bb7642defcde50e76c6ce8b720dcdacf3f97) added files directories skipped information ### 📊 Changes **13 files changed** (+442 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `.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) </details> ### 📄 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 : - A rolling thing, to indicate that the program doesn't freeze - The operation - Some more infos if needed 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 `.gitignore` file. You can reject it as well. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-06-08 11:27:51 +03:00
zhus closed this issue 2026-06-08 11:27:52 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#396