mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[GH-ISSUE #480] outputting progress indicator to stderr if stdout is redirected to a file #213
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?
Originally created by @xinehc on GitHub (Mar 29, 2025).
Original GitHub issue: https://github.com/bootandy/dust/issues/480
Hi,
The progress indicator is very helpful for scanning large folders but is disabled if the stdout is redirected to a file (https://github.com/bootandy/dust/issues/342).
Maybe instead of disabling it outputting it to stderr? or adding an option for switching?
@bootandy commented on GitHub (Mar 30, 2025):
-P, --no-progress Disable the progress indication.Although ideally it should auto-detect this using:
https://crates.io/crates/atty
https://doc.rust-lang.org/std/io/trait.IsTerminal.html (preferred)
so I'm leaving this open
@HernandoR commented on GitHub (Mar 31, 2025):
tried:
but no progress bar is showing
@bootandy commented on GitHub (Apr 1, 2025):
Oh I see, sorry I misread your original comment. You want to send the progress bar to stderr ? Why?
@bootandy commented on GitHub (Apr 1, 2025):
this would do that (currently considering):
https://github.com/bootandy/dust/pull/483
@xinehc commented on GitHub (Apr 1, 2025):
I want to keep a record of each regular disk scan, but scanning large RAID may take hours so knowing the status could be helpful.
@bootandy commented on GitHub (Apr 2, 2025):
progress bar now goes to stderr - on reflection this seems sensible. (he says hoping no one will complain with the new release :-) )