Add core:terminal

This commit is contained in:
Feoramund
2025-05-20 19:27:58 -04:00
parent 4329f50d26
commit 30c1b88741
5 changed files with 129 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
#+build linux, darwin, netbsd, openbsd, freebsd, haiku
package terminal
import "core:os"
import "core:sys/posix"
_is_terminal :: proc(handle: os.Handle) -> bool {
return bool(posix.isatty(posix.FD(handle)))
}