mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-08 08:38:51 +00:00
Add core:terminal
This commit is contained in:
@@ -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)))
|
||||
}
|
||||
Reference in New Issue
Block a user