v0.4.69
Pre-release
Pre-release
- Improvements and refactoring to I/O APIs.
- Fixed
System.IO.TerminalReader
to use a read buffer size of4096
rather than the system page size since the size has visible effects for users. - Added
TerminalIn
andTerminalOut
properties toSystem.VirtualTerminal
, enabling direct access to the terminal even when the standard I/O handles are redirected. - Renamed
StdIn
,StdOut
, andStdErr
properties onSystem.VirtualTerminal
toStandardIn
,StandardOut
, andStandardError
respectively. - Renamed
IsRedirected
property onSystem.IO.TerminalReader
andSystem.IO.TerminalWriter
toIsInteractive
and inverted its meaning. - Added
IsValid
property onSystem.IO.TerminalHandle
. - Added
System.SystemVirtualTerminal.SizePollingInterval
property to control resize polling interval (defaults toTimeSpan.FromMilliseconds(100)
). - Added
Reader
property onSystem.IO.TerminalReader
andWriter
property onSystem.IO.TerminalWriter
; these provide convenientTextReader
/TextWriter
wrappers. - Added
System.SystemVirtualTerminal.DangerousRestoreSettings
method. - Removed
System.Terminal.System
static property in favor ofSystem.SystemVirtualTerminal.Instance
. - Renamed some events to follow .NET naming conventions for events.
- Fixed
- Improvements to control sequence construction.
- Added many more control sequences to
System.Text.Control.ControlBuilder
,System.Text.Control.ControlSequences
, andSystem.Text.Control.ControlConstants
. - Changed
SetTitle
to takeReadOnlySpan<char>
instead ofstring
. - Added a
reallocateThreshold
parameter toSystem.Text.Control.ControlBuilder.Clear()
(defaults to4096
).
- Added many more control sequences to
- Various platform-specific driver improvements.
- Fixed regression in
SIGCONT
handling causing terminal settings to be incorrectly overwritten by System.Native. - Fixed Windows console input misbehaving in some cases when Ctrl-C was pressed.
- Fixed
IsRawMode
being set incorrectly when changing the mode threw an exception. - More thoroughly set Unix
termios
state and Windows console modes.- All known bits and modes are now set to sensible values as needed.
- Explicitly switch to cooked mode on initialization rather than trusting the shell.
- Use the same output lock for standard output and standard error.
- Use the new direct terminal access properties when changing terminal settings.
- Improved P/Invoke-related exception messages throughout driver code.
- Make drivers behave properly when any I/O handles are invalid.
- Fixed regression in
- Added a new
System.Diagnostics.TerminalProcess
API.- This API wraps
System.Diagnostics.Process
and bans the use of it. - This new API handles terminal settings for non-redirected child processes correctly.
- Non-redirected child processes can only be created in cooked mode.
- Processes can be created easily with the new
System.Diagnostics.TerminalProcessBuilder
class.
- This API wraps
- Added a new System.Terminal.Hosting package.
- Provides APIs that help ensure that terminal settings are correctly restored when your program exits.
- You implement the new
System.Hosting.IProgram
interface rather than writing a classicMain
entry point. - Backed by a source generator that generates the real
Main
entry point for you.
- System.Terminal packages now add
Using
items based on theImplicitUsings
MSBuild property. - Removed TermInfo NuGet dependency as it is not currently used.