vendor/github.com/mattn/go-isatty/isatty_plan9.go
changeset 251 1c52a0eeb952
child 260 445e01aede7e
equal deleted inserted replaced
250:c040f992052f 251:1c52a0eeb952
       
     1 // +build plan9
       
     2 
       
     3 package isatty
       
     4 
       
     5 import (
       
     6 	"syscall"
       
     7 )
       
     8 
       
     9 // IsTerminal returns true if the given file descriptor is a terminal.
       
    10 func IsTerminal(fd uintptr) bool {
       
    11 	path, err := syscall.Fd2path(int(fd))
       
    12 	if err != nil {
       
    13 		return false
       
    14 	}
       
    15 	return path == "/dev/cons" || path == "/mnt/term/dev/cons"
       
    16 }
       
    17 
       
    18 // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
       
    19 // terminal. This is also always false on this environment.
       
    20 func IsCygwinTerminal(fd uintptr) bool {
       
    21 	return false
       
    22 }