mintty: A reliable way to detect the presence of a MinTTY console on Windows
MinTTY is a Windows-specific terminal emulator for the widely used Cygwin and MSYS projects, which provide Unix-like environments for Windows. MinTTY consoles behave differently from native Windows consoles (such as cmd.exe or PowerShell) in many ways, and in some cases, these differences make it necessary to treat MinTTY consoles differently in code.
The mintty library provides a simple way to detect if your code in running in a MinTTY console on Windows. It exports isMinTTY, which does the right thing 90% of the time (by checking if standard error is attached to MinTTY), and it also exports isMinTTYHandle for the other 10% of the time (when you want to check is some arbitrary handle is attached to MinTTY). As you might expect, both of these functions will simply return False on any non-Windows operating system.
[Skip to Readme]
Flags
Automatic Flags
| Name | Description | Default |
|---|---|---|
| win32-2-13-1 | Use | Enabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- mintty-0.1.4.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1, 0.1.1, 0.1.2, 0.1.3, 0.1.4 (info) |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.3 && <5), Win32 [details] |
| Tested with | ghc ==7.0.4, ghc ==7.2.2, ghc ==7.4.2, ghc ==7.6.3, ghc ==7.8.4, ghc ==7.10.3, ghc ==8.0.2, ghc ==8.2.2, ghc ==8.4.4, ghc ==8.6.5, ghc ==8.8.4, ghc ==8.10.7, ghc ==9.0.2, ghc ==9.2.2 |
| License | BSD-3-Clause |
| Copyright | (C) 2017 Ryan Scott |
| Author | Ryan Scott |
| Maintainer | Ryan Scott <ryan.gl.scott@gmail.com> |
| Category | System |
| Home page | https://github.com/RyanGlScott/mintty |
| Bug tracker | https://github.com/RyanGlScott/mintty/issues |
| Source repo | head: git clone https://github.com/RyanGlScott/mintty |
| Uploaded | by ryanglscott at 2022-06-30T23:43:58Z |
| Distributions | Arch:0.1.4, Fedora:0.1.4, LTSHaskell:0.1.4, NixOS:0.1.4, Stackage:0.1.4 |
| Reverse Dependencies | 6 direct, 5024 indirect [details] |
| Downloads | 30164 total (14 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2022-07-01 [all 1 reports] |