summaryrefslogtreecommitdiff
path: root/tty_notwindows.go
blob: 77d4ef4eec1feff9194ed1d65a85e6a4daae677c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
}