On Tue, 2016-11-08 at 20:53 +0100, Marc Lehmann wrote:
> On Tue, Nov 08, 2016 at 04:02:53PM +0000, Ian Campbell <[email protected]> 
> wrote:
> > 
> > This was reported to docker https://github.com/docker/docker/issues/281
> > 11 when doing a docker pull there is a multi-line scrolling progress
> > bar, when running under rxvt-unicode the final line is duplicated.
> 
> Ok, after analyzing it, docker relies on undocumented behaviour in xterm.
> Basically, docker does "move cursor 0 lines up" and expects the terminal
> to move up one line, which xterm does, but urxvt doesn't. To try it out,
> run this near the bottom line of the screen:
> 
>    printf "\n\n\e[0B\e[0A---"
> 
> (Try with a plain shell prompt when unsure)
> 
> This will leave the --- (and the prompt) in the last line of the screen
> with urxvt, and in the second to last line with xterm.

That's indeed what i see. Thanks for the explaination, I was pretty
confused by it all!

> In summary: docker outputs a lot of "move cursor 0 characters" commands,
> which are undocumented, non-ANSI, and behave different in different
> terminals.

That likely "explains" the comment at 
https://github.com/docker/docker/blob/master/pkg/jsonmessage/jsonmessage.go#L195
i.e. the author was using some terminal with a particular behaviour and
was lead astray.

Anywy, I agree with all you say and will investigate using termcap
since that seems like the best option (assuming I can find a decent
termcap library for go...)

Thanks for your help & input!

Ian.

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/rxvt-unicode

Reply via email to