Documentation
¶
Index ¶
Constants ¶
const DefaultTerminalHeight = 25
DefaultTerminalHeight is the default fallback terminal height.
const DefaultTerminalWidth = 80
DefaultTerminalWidth is the default fallback terminal width.
Variables ¶
var FixedTerminalHeight = -1
FixedTerminalHeight allows a manual fixed override of the terminal height.
var FixedTerminalWidth = -1
FixedTerminalWidth allows a manual fixed override of the terminal width.
Functions ¶
func GetTerminalSize ¶
GetTerminalSize return the terminal size as a width and height tuple. In case the terminal size cannot be determined, a reasonable default is used: 80x25. A manual override is possible using FixedTerminalWidth and FixedTerminalHeight.
func GetTerminalWidth ¶
func GetTerminalWidth() int
GetTerminalWidth return the terminal width (available characters per line)
func IsUnixGardenContainer ¶
func IsUnixGardenContainer() bool
IsUnixGardenContainer is used for Unix-like system, returns whether the current process is started in the process tree of garden container (https://github.com/cloudfoundry/garden). IsUnixGardenContainer fixes the function github.com/gonvenience/term@v1.0.0#IsGardenContainer, which causes nil-pointer panic on windows, cause there is no process of pid 1.
Types ¶
This section is empty.