Help us shape the future of Go! Take the 2026 Go Developer Survey

termseq

package
v0.44.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package termseq writes control sequences to whatever terminal is actually drawing this process, tunnelling them past a hosting tmux when there is one, and tells whether that terminal is on this machine at all.

Index

Constants

This section is empty.

Variables

Out is the stream the sequences go to; tests point it elsewhere.

Functions

func Emit

func Emit(seq string) error

Emit sends a control sequence to the outer terminal. Under tmux only the passthrough envelope goes out: tmux interprets sequences it recognises against the pane instead of the window, and gates several of them behind options a user may have turned off. EnablePassthrough must have opened the envelope first.

func EnablePassthrough

func EnablePassthrough()

EnablePassthrough asks the hosting tmux, when there is one, to let this pane's passthrough sequences reach the outer terminal. Off by default since tmux 3.3, and without it every Emit above dies at the multiplexer.

func Passthrough

func Passthrough(seq string) string

Passthrough wraps a sequence in DCS tmux;…ST, doubling every ESC as tmux's passthrough protocol requires.

func Remote added in v0.39.0

func Remote() bool

Remote reports whether the terminal drawing this process sits on another machine at the far end of an SSH session, where this host's browser, clipboard and desktop are out of the user's reach.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL