github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/pipes/psuedotty/teepty.go (about)

     1  package psuedotty
     2  
     3  import (
     4  	"github.com/lmorg/murex/builtins/pipes/streams"
     5  )
     6  
     7  func NewTeePTY(width int, height int) (pty *PTY, primary *streams.Tee, secondary *streams.Stdin, err error) {
     8  	pty, err = NewPTY(width, height)
     9  	if err != nil {
    10  		return nil, nil, nil, err
    11  	}
    12  
    13  	primary, secondary = streams.NewTee(pty)
    14  
    15  	return pty, primary, secondary, nil
    16  }