-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
mv: add progress bar #4220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mv: add progress bar #4220
Conversation
Similarly to `cp`, adds `-g` and `--progress` flags to enable a progress bar via indicatif.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! I really like this design. My only important suggestion is that we can simplify the logic around the MultiProgress
, by always initializing one if the progress bar flag is passed. Then we can always just add to it instead of having to branch between a MultiProgress
and a single ProgressBar
.
It's a bit unfortunate that we have to take suspend
into account for all the prints, but I don't have a solution for that :)
GNU testsuite comparison:
|
Thank you for all the feedback! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks!
Oh I remembered something right after I merged. @ctsk, could you explain the behaviour also in https://uutils.github.io/user/extensions.html? The source for that is |
Opened a PR here: #4234 |
Similarly to
cp
, adds-g
and--progress
flags to enable a progress bar via indicatif.The logic is tricker than the progress bar logic in
cp
and modeled closely to the implementation in advcpmv. In particular, the progress bar does not calculate the total size of the files if the move is performed via a rename operation. To still show adequate feedback, we use two progress bars:Screenshots
Multiple a file and a folder are mv'd across filesystems: