Pane.Writer
Writer returns the pane's keyboard as an io.Writer. Bytes written to it are typed into the pane literally, and each newline is the Enter key, so fmt.Fprintln submits a line as a person at the keyboard would. Text with no trailing newline is typed and left on the line.
Source and package
- Qualified name
-
tmux.Pane. Writer - Package
- tmux
- Declared in
Pane- Distribution
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/pane_input.go
-
Description#
A write returns once tmux has taken the keys, before the pane's program has read them; the program interprets what arrives. A line with a trailing newline costs two tmux commands, the text and a separate Enter; buffering whole lines still costs far less than writing bytes one at a time.
A write of any size is typed whole, so
io.Copyworks: a line longer than tmux takes in one command is sent in pieces.- Parameters
Guides#
Pages that discuss Writer.