diff options
Diffstat (limited to 'tty_notwindows.go')
| -rw-r--r-- | tty_notwindows.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tty_notwindows.go b/tty_notwindows.go new file mode 100644 index 0000000..77d4ef4 --- /dev/null +++ b/tty_notwindows.go @@ -0,0 +1,18 @@ +//go:build !windows +// +build !windows + +package main + +import ( + "github.com/gdamore/tcell/v2" +) + +func opentty() (tty tcell.Tty, err error) { + device := ttyDevice() + debugLog.Println("Using tty device:", device) + tty, err = tcell.NewDevTtyFromDev(device) + if err == nil { + err = tty.Start() + } + return +} |
