TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.58k stars 247 forks source link

imgadm is unkind to truly "dumb" terminals #603

Open richlowe opened 8 years ago

richlowe commented 8 years ago

I use emacs *shell* buffers a lot. The progress tracker in imgadm is very unkind here. It seems to use terminal escapes (presumably xterm) to even clear the line, and so never clears the line, leading to very very long lines (which hurt emacs a lot).

It'd be great if this didn't happen, even if it were via not showing a live progress indicator when $TERM == "dumb"

trentm commented 8 years ago

@richlowe Hmm. imgadm is using node-progbar for its progress bars, which has this check for TERM: https://github.com/joyent/smartos-live/blob/master/src/img/node_modules/progbar/lib/progbar.js#L44-L52

And then this might be the relevant block that is trying to clear the line before re-drawing the progressbar: https://github.com/joyent/smartos-live/blob/master/src/img/node_modules/progbar/lib/progbar.js#L307-L325

I don't know if you'd have the BW to play with progbar in an emacs *shell* buffer to try to repro?