I wonder whether it's intentional that the progress bar is spammed across a terminal if the terminal's window width is not wide enough for printing the complete progress bar. If it's wide enough, the progress bar updates in-place, which is good. But I encountered that it starts spamming if it's too narrow.
Is there a way to prevent this despite using a forced carriage return from my side?
Here a picture of how my progress bar looks like if the window is sufficiently wide:

Vs. too narrow:

This can be influenced by setting the bar width option of the progress bar. However, doesn't seem like a preferable solution to me as it is then depending on the user's terminal and display settings.
Running on Ubuntu 20.04 using the default Ubuntu bash terminal.
I wonder whether it's intentional that the progress bar is spammed across a terminal if the terminal's window width is not wide enough for printing the complete progress bar. If it's wide enough, the progress bar updates in-place, which is good. But I encountered that it starts spamming if it's too narrow.
Is there a way to prevent this despite using a forced carriage return from my side?
Here a picture of how my progress bar looks like if the window is sufficiently wide:

Vs. too narrow:

This can be influenced by setting the bar width option of the progress bar. However, doesn't seem like a preferable solution to me as it is then depending on the user's terminal and display settings.
Running on Ubuntu 20.04 using the default Ubuntu bash terminal.