Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 08-Aug-2017 | - | ||||
.gitignore | H A D | 08-Aug-2017 | 27 | 5 | 4 | |
License | H A D | 08-Aug-2017 | 1 KiB | 24 | 20 | |
README.md | H A D | 08-Aug-2017 | 469 | 37 | 28 | |
doc.go | H A D | 08-Aug-2017 | 349 | 17 | 9 | |
ioctl.go | H A D | 08-Aug-2017 | 174 | 12 | 9 | |
ioctl_bsd.go | H A D | 08-Aug-2017 | 1.1 KiB | 40 | 28 | |
mktypes.bash | H A D | 08-Aug-2017 | 311 | 20 | 14 | |
pty_darwin.go | H A D | 08-Aug-2017 | 1 KiB | 61 | 49 | |
pty_freebsd.go | H A D | 08-Aug-2017 | 1.4 KiB | 74 | 63 | |
pty_linux.go | H A D | 08-Aug-2017 | 866 | 47 | 38 | |
pty_unsupported.go | H A D | 08-Aug-2017 | 146 | 12 | 7 | |
run.go | H A D | 08-Aug-2017 | 546 | 29 | 23 | |
types.go | H A D | 08-Aug-2017 | 83 | 11 | 6 | |
types_freebsd.go | H A D | 08-Aug-2017 | 210 | 16 | 6 | |
util.go | H A D | 08-Aug-2017 | 625 | 36 | 29 | |
ztypes_386.go | H A D | 08-Aug-2017 | 118 | 10 | 5 | |
ztypes_amd64.go | H A D | 08-Aug-2017 | 118 | 10 | 5 | |
ztypes_arm.go | H A D | 08-Aug-2017 | 118 | 10 | 5 | |
ztypes_arm64.go | H A D | 08-Aug-2017 | 135 | 12 | 5 | |
ztypes_freebsd_386.go | H A D | 08-Aug-2017 | 171 | 14 | 8 | |
ztypes_freebsd_amd64.go | H A D | 08-Aug-2017 | 202 | 15 | 9 | |
ztypes_freebsd_arm.go | H A D | 08-Aug-2017 | 171 | 14 | 8 | |
ztypes_freebsd_arm64.go | H A D | 03-May-2022 | 183 | 14 | 8 | |
ztypes_ppc64.go | H A D | 08-Aug-2017 | 135 | 12 | 5 | |
ztypes_ppc64le.go | H A D | 08-Aug-2017 | 137 | 12 | 5 | |
ztypes_s390x.go | H A D | 08-Aug-2017 | 135 | 12 | 5 |
README.md
1# pty 2 3Pty is a Go package for using unix pseudo-terminals. 4 5## Install 6 7 go get github.com/kr/pty 8 9## Example 10 11```go 12package main 13 14import ( 15 "github.com/kr/pty" 16 "io" 17 "os" 18 "os/exec" 19) 20 21func main() { 22 c := exec.Command("grep", "--color=auto", "bar") 23 f, err := pty.Start(c) 24 if err != nil { 25 panic(err) 26 } 27 28 go func() { 29 f.Write([]byte("foo\n")) 30 f.Write([]byte("bar\n")) 31 f.Write([]byte("baz\n")) 32 f.Write([]byte{4}) // EOT 33 }() 34 io.Copy(os.Stdout, f) 35} 36``` 37