MCPcopy Index your code
hub / github.com/docker/cli / resizeTty

Function resizeTty

cli/command/container/tty.go:52–55  ·  view source on GitHub ↗

resizeTty is to resize the tty with cli out's tty size

(ctx context.Context, cli command.Cli, id string, isExec bool)

Source from the content-addressed store, hash-verified

50
51// resizeTty is to resize the tty with cli out's tty size
52func resizeTty(ctx context.Context, cli command.Cli, id string, isExec bool) error {
53 height, width := cli.Out().GetTtySize()
54 return resizeTTYTo(ctx, cli.Client(), id, height, width, isExec)
55}
56
57// initTtySize is to init the TTYs size to the same as the window, if there is an error, it will retry 10 times.
58func initTtySize(ctx context.Context, cli command.Cli, id string, isExec bool, resizeTtyFunc func(ctx context.Context, cli command.Cli, id string, isExec bool) error) {

Callers 1

MonitorTtySizeFunction · 0.85

Calls 4

resizeTTYToFunction · 0.85
GetTtySizeMethod · 0.80
OutMethod · 0.65
ClientMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…