We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bf139e commit 1354a38Copy full SHA for 1354a38
library/std/src/io/stdio.rs
@@ -1054,6 +1054,10 @@ pub trait IsTerminal: crate::sealed::Sealed {
1054
/// On platforms where Rust does not know how to detect a terminal yet, this will return
1055
/// `false`. This will also return `false` if an unexpected error occurred, such as from
1056
/// passing an invalid file descriptor.
1057
+ ///
1058
+ /// On Windows, in addition to detecting consoles, this currently uses some heuristics to
1059
+ /// detect older msys/cygwin/mingw pseudo-terminals based on device name: devices with names
1060
+ /// starting with `msys-` or `cygwin-` and ending in `-pty` will be considered terminals.
1061
fn is_terminal(&self) -> bool;
1062
}
1063
0 commit comments