zig/lib/std/io
Ryan Liptak 337f09e932 Add File.getOrEnableAnsiEscapeSupport and use it
On Windows, the console mode flag `ENABLE_VIRTUAL_TERMINAL_PROCESSING` determines whether or not ANSI escape codes are parsed/acted on. On the newer Windows Terminal, this flag is set by default, but on the older Windows Console, it is not set by default, but *can* be enabled (since Windows 10 RS1 from June 2016).

The new `File.getOrEnableAnsiEscapeSupport` function will get the current status of ANSI escape code support, but will also attempt to enable `ENABLE_VIRTUAL_TERMINAL_PROCESSING` on Windows if necessary which will provide better/more consistent results for things like `std.Progress` and `std.io.tty`.

This type of change was not done previously due to a mistaken assumption (on my part) that the console mode would persist after the run of a program. However, it turns out that the console mode is always reset to the default for each program run in a console session.
2024-06-02 16:46:21 -07:00
..
Reader Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
bit_reader.zig std: remove meta.trait 2023-11-22 13:24:27 -05:00
bit_writer.zig std: remove meta.trait 2023-11-22 13:24:27 -05:00
buffered_atomic_file.zig
buffered_reader.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
buffered_writer.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
c_writer.zig extract std.posix from std.os 2024-03-19 11:45:09 -07:00
change_detection_stream.zig
counting_reader.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
counting_writer.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
find_byte_writer.zig
fixed_buffer_stream.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
limited_reader.zig Fix simple doc mistakes. (#17624) 2023-10-21 21:24:55 +00:00
multi_writer.zig x86_64: implement 128-bit builtins 2023-10-23 22:42:18 -04:00
Reader.zig std.builtin: make container layout fields lowercase 2024-03-11 07:09:07 -07:00
seekable_stream.zig
stream_source.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
test.zig Replace std.rand references with std.Random 2024-02-08 15:21:35 +01:00
tty.zig Add File.getOrEnableAnsiEscapeSupport and use it 2024-06-02 16:46:21 -07:00
Writer.zig add std.zip and support zip files in build.zig.zon 2024-05-03 16:58:53 -04:00