nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
console: only color outputs if stdout isa TTY
[nit.git]
/
lib
/
core
/
posix.nit
diff --git
a/lib/core/posix.nit
b/lib/core/posix.nit
index
2969830
..
587e606
100644
(file)
--- a/
lib/core/posix.nit
+++ b/
lib/core/posix.nit
@@
-111,3
+111,8
@@
extern class Group `{struct group*`}
return ret;
`}
end
+
+redef class Int
+ # Does the file descriptor `self` refer to a terminal?
+ fun isatty: Bool `{ return isatty(self); `}
+end