Chromium Code Reviews| Index: sdk/lib/io/stdio.dart |
| diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart |
| index 29ea48d2a4380dbb9ca1459fb12715eeff26bae4..5df26007a8c18292ebec9f6ae9ce27fb0ee8a376 100644 |
| --- a/sdk/lib/io/stdio.dart |
| +++ b/sdk/lib/io/stdio.dart |
| @@ -137,6 +137,15 @@ class Stdin extends _StdStream implements Stream<List<int>> { |
| external void set lineMode(bool enabled); |
| /** |
| + * When connected to a terminal, whether ANSI codes are supported. |
|
Lasse Reichstein Nielsen
2017/03/17 08:55:29
This is very vague.
"ANSI codes" should probably
Lasse Reichstein Nielsen
2017/03/17 08:55:29
It doesn't say what happens when it's not connecte
zra
2017/03/17 15:38:51
Done.
zra
2017/03/17 15:38:51
Done.
|
| + * |
| + * This is `true` if the TERM environment variable contains the string |
| + * 'xterm', except on Windows where support is detected only in recent |
| + * versions of Windows 10. |
|
Lasse Reichstein Nielsen
2017/03/17 08:55:28
This is very specific. Consider just saying:
Not
zra
2017/03/17 15:38:51
Done.
Flutter is recommending PowerShell on Windo
Lasse Reichstein Nielsen
2017/03/17 16:02:49
This is not Flutter specific, the comment applies
zra
2017/03/17 17:45:35
I'm afraid I don't follow you. You asked whether v
|
| + */ |
| + external bool get ansiSupported; |
|
Lasse Reichstein Nielsen
2017/03/17 08:55:29
I'd prefer a name like `supportsAnsiEscapes` (or *
zra
2017/03/17 15:38:51
Done.
|
| + |
| + /** |
| * Synchronously read a byte from stdin. This call will block until a byte is |
| * available. |
| * |
| @@ -186,9 +195,19 @@ class Stdout extends _StdFileSink implements IOSink { |
| */ |
| int get terminalLines => _terminalLines(_fd); |
| + /** |
| + * When connected to a terminal, whether ANSI codes are supported. |
| + * |
| + * This is `true` if the TERM environment variable contains the string |
| + * 'xterm', except on Windows where support is detected only in recent |
| + * versions of Windows 10. |
| + */ |
| + bool get ansiSupported => _ansiSupported(_fd); |
| + |
| external bool _hasTerminal(int fd); |
| external int _terminalColumns(int fd); |
| external int _terminalLines(int fd); |
| + external static bool _ansiSupported(int fd); |
| /** |
| * Get a non-blocking `IOSink`. |