With the rise of *nix tools and infrastructure on Windows (including, but certainly not limited to Visual Studio Code and Windows Subsystem for Linux), I need to get acquainted to the new ways these interface to the Windows Console.
Since Windows Console is from the (now obsolete) UCS-2 days, so it is not even fully Unicode aware, and has trouble with UTF-8, UTF-16.
So here are some links for my reading list:
- The five part blog series in 2018 by [Archive.is] Rich Turner (who went by “Rich Tur-minal-ner-d” for a while):
- [Wayback/Archive.is] Windows Command-Line: Backgrounder | Windows Command Line Tools For Developers
- [Wayback/Archive.is] Windows Command-Line: The Evolution of the Windows Command-Line | Windows Command Line (leading up to the Windows Console and Windows Subsystem for Linux teams)
- [Wayback/Archive.is] Windows Command-Line: Inside the Windows Console | Windows Command Line (especially the bits about
conhost.exe
andcondrv.sys
, and the core everything is a file/object difference in the unix and Windows world) - [Wayback/Archive.is] Windows Command-Line: Introducing the Windows Pseudo Console (ConPTY) | Windows Command Line
- [Wayback/Archive.is] Windows Command-Line: Unicode and UTF-8 Output Text Buffer | Windows Command Line
- Vim has supported ConPTY this way [Wayback/Archive.is] Make winpty as default on unstable ConPTY environment by k-takata · Pull Request #3949 · vim/vim
- Keep the default value of ‘termwintype’ as “”.
- If ‘termwintype’ is “” and if ConPTY is considered stable (Win10 1903? or later), use ConPTY.
- If ‘termwintype’ is “” and if ConPTY is considered unstable (1809), use winpty.
- If ‘termwintype’ is “” and if ConPTY is not available (before 1809), use winpty.
- If ‘termwintype’ is “conpty”, use ConPTY even if it is unstable (1809).
- If ‘termwintype’ is “winpty”, use winpty.
- Other tools have it build in too, according to the thread started by [Wayback/Archive.is] The state of ConPTY terminal emulators on Windows? : commandline
- Uses ConPTY (more than the above Reddit post, as some more by now added support):
- [Wayback/Archive.is] Windows Terminal
- [Wayback/Archive.is] alacritty/alacritty: A cross-platform, OpenGL terminal emulator.
- [Wayback/Archive.is] Eugeny/tabby: A terminal for a more modern age (formerly Terminus)
- [Wayback/Archive.is] felixse/FluentTerminal: A Terminal Emulator based on UWP and web technologies.
- [Wayback/Archive.is] sedwards2009/extraterm: The swiss army chainsaw of terminal emulators
- Does not use ConPTY:
- [Wayback/Archive.is] cmderdev/cmder: Lovely console emulator package for Windows (it depends on ConEmu to do the PTY interfacing)
- [Wayback/Archive.is] Maximus5/ConEmu: Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more (when writing this blog post, there was still no ConPTY support: [Wayback/Archive.is] [FeatureRequest] Host terminals from remote desktop sessions. · Issue #1678 · Maximus5/ConEmu)
- Uses ConPTY (more than the above Reddit post, as some more by now added support):
- These Wikipedia articles:
- Pseudoterminal – Wikipedia
- ANSI escape code – Wikipedia
- Windows Terminal – Wikipedia (note that while writing this, it wasn’t possible to install the non-beta from the console and keep it up to date automatically)
- Windows Console – Wikipedia (and its section on
conhost.exe
)
- [Wayback/Archive.is] microsoft/terminal: The new Windows Terminal and the original Windows console host, all in the same place!
- Install through [Wayback/Archive.is] aka.ms/terminal
- Related git repositories:
- [Wayback/Archive.is] rprichard/winpty: A Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs.
- [Wayback/Archive.is] PyEchoCon/PyEchoCon.py at master · iljau/PyEchoCon
- [Wayback/Archive.is] spyder-ide/pywinpty: Pseudoterminals for Windows in Python
–jeroen