env

package
v0.24.0-rc0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsSmartTerminal = func(w io.Writer) bool {
	if !IsTerminal(w) {
		return false
	}

	if os.Getenv("TERM") == "dumb" {
		return false
	}

	if runtime.GOOS == "windows" && os.Getenv("WT_SESSION") == "" {
		return false
	}

	return true
}

IsSmartTerminal returns true if the writer w is a terminal AND we think that the terminal is smart enough to use VT escape codes etc.

Functions

func IsTerminal

func IsTerminal(w io.Writer) bool

IsTerminal returns true if the writer w is a terminal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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