File: std_windows.go

package info (click to toggle)
golang-github-bettercap-readline 1.4%2Bgit20210228.655e48b-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 304 kB
  • sloc: makefile: 3
file content (19 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// +build windows

package readline

import (
	"os"
	"os/exec"
)

func init() {
	//no buffering
	exec.Command("stty", "cbreak", "min", "1").Run()
	//no visible output
	exec.Command("stty", "-echo").Run()

	Stdin = os.Stdin
	Stdout = os.Stdout
	Stderr = os.Stderr
}