Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement IO::FileDescriptor's console methods on Windows #12294

Merged

Conversation

HertzDevil
Copy link
Contributor

This PR implements IO::FileDescriptor#noecho, #cooked, #raw, plus their bang variants on Windows. For consistency it also adds #echo(&) and #echo!.

samples\2048.cr will now work properly on CMD, Windows Terminal, or Visual Studio Code's integrated terminal. Try it!

The corresponding Crystal::System::FileDescriptor#system_echo and #system_raw for Unix-like systems will be added in a follow-up PR, because they involve some less related breaking changes (making some methods return nil and deprecating the *_tc_mode! macros).

@HertzDevil HertzDevil added kind:feature platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib:files labels Jul 19, 2022
@beta-ziliani beta-ziliani added this to the 1.6.0 milestone Aug 1, 2022
@straight-shoota straight-shoota merged commit 94e352d into crystal-lang:master Aug 2, 2022
@HertzDevil HertzDevil deleted the feature/win32-console branch August 3, 2022 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:feature platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib:files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants