Commit Graph

3 Commits

Author SHA1 Message Date
Ian Campbell b7ced33036 Revendor github.com/Nvveen/Gotty for github.com/Nvveen/Gotty#2
This fixes https://github.com/docker/docker/issues/32400

We were already actually vendoring from github.com/ijc25/Gotty in order to
pickup github.com/Nvveen/Gotty#1. github.com/ijc25/Gotty#master now contains
merges of both of those upstream PRs.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-06 12:19:32 +01:00
Akihiro Suda 5a1b06d7fd rerun vndr
* run latest vndr so as to collect more LICENSE files
 * remove unused packages
 * vendor github.com/philhofer/fwd with LICENSE.md (MIT)
 * vendor github.com/bsphere/le_go with LICENSE (MIT)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-03-08 02:29:34 +00:00
Ian Campbell f02221a794 pkg/jsonmessage: Use terminfo rather than open coding ANSI escape codes
Although our use of ANSI codes here is rather simple it is generally good
practice to use terminfo in order to be portable to different terminal
emulators.

Vendor github.com/Nvveen/Gotty (actually my fork with a fix, see
https://github.com/Nvveen/Gotty/pull/1) and use that to parse the terminfo
files.

Note that "\e]2K" (clear entire line) is not covered by terminfo. We can
achieve the same end by first clearing from begining of line to cursor
(el1="\e]1K") and then clearing from cursor to end of line (el="\e]k").

Test suite has been updated and forces (either directly or by setting $TERM to
something highly unlikely to exist) the use of the non-terminfo fallbacks which
retains the same output behaviour as previously. This is preferable even to
relying on a well-known and relatively static terminfo (like vt102) since even
that in principal might have different terminfo encodings.

In case terminfo is not available at all for $TERM or doesn't expose the
specific capabilities which we use then fall back to the previous manual
escapes, with the exception that we avoid "\e]2K" as discussed above.

Tested with a manual docker pull with rxvt-unicode ($TERM=rxvt-unicode), xterm
($TERM=xterm), mlterm ($TERM=mlterm) and aterm ($TERM=kterm).

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-11-11 11:40:53 +00:00