Closed martinsvalin closed 9 years ago
Good point. I have considered auto-detecting terminal width at some point.
Seems ruby-progressbar has this figured out: https://github.com/jfelchner/ruby-progressbar/wiki/Overriding-the-Length
Seems tput cols
in a terminal will get us the number of columns: http://stackoverflow.com/questions/263890/how-do-i-find-the-width-height-of-a-terminal-window
Considering this done. @martinsvalin, if you have the inclination, try it out and let me know how it works for you!
Progress bars are pretty wide. When the terminal window is too narrow for them, they print each update on its own line. I don't know the exact break point, but 80 columns is too narrow and will show this bug.