Skip to content

Add support for custom formatting of progress#2

Open
lubomir wants to merge 2 commits intomrunderline:masterfrom
lubomir:size-formatter
Open

Add support for custom formatting of progress#2
lubomir wants to merge 2 commits intomrunderline:masterfrom
lubomir:size-formatter

Conversation

@lubomir
Copy link

@lubomir lubomir commented May 25, 2023

The default display of count/goal is not great when the progressbar tracks a large number like size of a downloaded file.

This attribute allows setting a function that can process the value before it is printed.

lubomir added 2 commits May 25, 2023 15:10
The default display of count/goal is not great when the progressbar
tracks a large number like size of a downloaded file.

This attribute allows setting a function that can process the value
before it is printed.
While it was possible to get garbage characters before the previous
commit by setting goal to a smaller value and reusing the same
progressbar, the previous commit made it much more likely. Originally
the size part could only grow, but now it can shrink.

This commit adds just enough spaces to the printed line to cover up
everything from the previous iteration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant