Commit Graph

28 Commits

Author SHA1 Message Date
Josh Wilson c0a5772668 Force input stream ANSI emulation for ConsoleZ
This performs a similar check to the `"ConEmuANSI"` check that was recently
added to enable arrow keys navigation in docker container terminals.

Signed-off-by: Josh Wilson <josh.wilson@fivestars.com>
2016-10-05 12:42:48 -07:00
Ron Williams 0fd4bbda2d Force input stream ANSI emulation for ConEmu.
Signed-off-by: Ron Williams <ron.a.williams@gmail.com>
2016-08-10 11:24:12 -07:00
John Starks 83c186fdd4 Windows: Restore console mode on set mode failure
SetConsoleMode() on input handles appears to remember invalid bits that
were set, causing problems for other programs (such as xcopy.exe) trying
to set the console mode after docker.exe has exited. Always restore
the input console mode on set failure.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-07-22 18:34:15 -07:00
John Starks 4acc2c7499 Windows: Always enable VT emulation
Always enable VT output emulation when starting the process so that
non-attaching commands can still output VT codes.

Also remove the version block for using the native console and just rely
on supported flags being present.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-06-23 13:14:39 -07:00
John Howard c152dc48e5 Windows: Turn on native console by default
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-20 19:19:26 -07:00
John Howard 331c8a86d4 Windows: Remove TP4 support from main code
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-06 12:12:20 -07:00
John Howard fc9912fd00 Merge pull request #21272 from Microsoft/jstarks/manifest_updates
Add os_version and os_features to Image
2016-04-05 16:16:25 -07:00
John Starks 194eaa5c0f Add os_version and os_features to Image
These fields are needed to specify the exact version of Windows that an
image can run on. They may be useful for other platforms in the future.

This also changes image.store.Create to validate that the loaded image is
supported on the current machine. This change affects Linux as well, since
it now validates the architecture and OS fields.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-04 13:14:57 -07:00
Alexander Morozov 07b568cb53 pkg: cleanup some unused code
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-03-31 11:39:59 -07:00
John Howard c162cdb15f Windows: Native console disableNewlineAutoReturn
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-24 15:37:47 -07:00
John Howard 506722bf9f Improvements to ANSI emulation in conemu
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-01-28 20:37:42 -08:00
John Howard 33729d3b5a Windows: VirtualTerminalInput native console
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-01-19 15:59:21 -08:00
John Howard 76ebd3dd17 Windows: Remove dead code
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-01-15 12:48:40 -08:00
John Howard 805dd0eeed Windows: Native ANSI console support
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-30 13:44:04 -07:00
Aaron Lehmann 35e498beca Fix golint nit in term_windows.go
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-27 17:40:49 -07:00
Jessie Frazelle 33358f80e5 Merge pull request #14838 from Microsoft/10662-ansirewrite
Windows: CLI Improvement (TP3)
2015-07-27 17:30:14 -07:00
Vincent Demeester 18c7c67308 Lint on pkg/* packages
- pkg/useragent
- pkg/units
- pkg/ulimit
- pkg/truncindex
- pkg/timeoutconn
- pkg/term
- pkg/tarsum
- pkg/tailfile
- pkg/systemd
- pkg/stringutils
- pkg/stringid
- pkg/streamformatter
- pkg/sockets
- pkg/signal
- pkg/proxy
- pkg/progressreader
- pkg/pools
- pkg/plugins
- pkg/pidfile
- pkg/parsers
- pkg/parsers/filters
- pkg/parsers/kernel
- pkg/parsers/operatingsystem

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-27 21:26:21 +02:00
John Howard c923774c41 Windows: CLI Improvement
The Ansi parser and their associated actions have been decoupled. Now
parsing results in call backs to an interface which performs the
appropriate actions depending on the environment.

This improvement provides a functional Vi experience and the vttest no
longer panics.

This PR replaces docker/docker #13224 with the latest console updates.

Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-21 16:38:44 -07:00
Alexander Morozov 7b3492df0c Fix windows tag in pkg/term
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-01 13:16:16 -07:00
Brendan Dixon c337bfd2e0 Turned off Ctrl+C processing by Windows shell
Signed-off-by: Brendan Dixon <brendand@microsoft.com>
2015-04-10 15:43:35 -07:00
Ahmet Alp Balkan 6e44246fed Swap width/height in GetWinsize and monitorTtySize
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-04-06 14:31:42 -07:00
Brendan Dixon 1a36a113d4 Windows console fixes
Corrected integer size passed to Windows
Corrected DisableEcho / SetRawTerminal to not modify state
Cleaned up and made routines more idiomatic
Corrected raw mode state bits
Removed duplicate IsTerminal
Corrected off-by-one error
Minor idiomatic change

Signed-off-by: Brendan Dixon <brendand@microsoft.com>
2015-04-03 15:02:52 -07:00
Ahmet Alp Balkan b38ff8c83d Disable ANSI emulation in certain windows shells
This disables recently added ANSI emulation feature in certain Windows
shells (like ConEmu) where ANSI output is emulated by default with builtin
functionality in the shell.

MSYS (mingw) runs in cmd.exe window and it doesn't support emulation.

Cygwin doesn't even pass terminal handles to docker.exe as far as I can
tell, stdin/stdout/stderr handles are behaving like non-TTY. Therefore not
even including that in the check.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-23 18:38:43 +00:00
Tibor Vass 01a43174da winconsole: cleanup
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-03-22 15:47:54 -04:00
Sachin Joshi 45262c4cb0 Use syscall consts, check for errors,
Also rename func for non-windows specific names.

Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-16 14:04:56 -07:00
Sachin Joshi 898d2763c5 Move windows console specific implementation in sub package
Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
2015-03-16 14:04:53 -07:00
Sachin Joshi d8c3090dd9 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>
2015-03-16 14:04:49 -07:00
John Gossman 975b6e598d Refactor pkg/term package for Windows tty support
Signed-off-by: John Gossman <johngos@microsoft.com>
2014-11-14 18:20:53 -08:00