MCPcopy
hub / github.com/cloudfoundry/cli / shouldAllocateTerminal

Method shouldAllocateTerminal

cf/ssh/ssh.go:377–390  ·  view source on GitHub ↗
(opts *options.SSHOptions, stdinIsTerminal bool)

Source from the content-addressed store, hash-verified

375}
376
377func (c *secureShell) shouldAllocateTerminal(opts *options.SSHOptions, stdinIsTerminal bool) bool {
378 switch opts.TerminalRequest {
379 case options.RequestTTYForce:
380 return true
381 case options.RequestTTYNo:
382 return false
383 case options.RequestTTYYes:
384 return stdinIsTerminal
385 case options.RequestTTYAuto:
386 return len(opts.Command) == 0 && stdinIsTerminal
387 default:
388 return false
389 }
390}
391
392func (c *secureShell) resize(resized <-chan os.Signal, session SecureSession, terminalFd uintptr) {
393 type resizeMessage struct {

Callers 1

InteractiveSessionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected