rolffokkens / bdsync

a fast block device synchronizing tool
GNU General Public License v2.0
109 stars 26 forks source link

Keep output of --progress on the same line #35

Closed seasonshu closed 1 year ago

seasonshu commented 1 year ago

This change will keep the terminal tidy and users are able to read which file we are actually bdsync'ing. Before logging any subsequent messages the code will print a newline character if required.

rolffokkens commented 1 year ago

This needs some thinking on my part. The neednewline variable makes sense, although I'm not fond of it's global nature. I know there are other global variables for options, but I'm not a fan.

rolffokkens commented 1 year ago

Merged, after some tweaking. The --progress option allows an optional --progress=noscroll so any existing programs that process the progress output won't break.