ANSI terminal emulation for windows

It is implemented by intercepting and interpreting the output
escape sequence by calling win32 console apis.

In addition the input from win32 console is translated to linux keycodes

Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
Upstream-commit: d8c3090dd9abe3f0d95f99c9d8c7660922e9a719
Component: engine
This commit is contained in:
Sachin Joshi
2015-01-23 17:33:49 -08:00
parent 2479608ad5
commit 78e67ff2df
8 changed files with 1926 additions and 44 deletions

View File

@ -137,19 +137,12 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, keyFile string, proto, a
if tlsConfig != nil {
scheme = "https"
}
if in != nil {
if file, ok := in.(*os.File); ok {
inFd = file.Fd()
isTerminalIn = term.IsTerminal(inFd)
}
inFd, isTerminalIn = term.GetHandleInfo(in)
}
if out != nil {
if file, ok := out.(*os.File); ok {
outFd = file.Fd()
isTerminalOut = term.IsTerminal(outFd)
}
outFd, isTerminalOut = term.GetHandleInfo(out)
}
if err == nil {