MCPcopy
hub / github.com/docker/compose / hintLink

Function hintLink

cmd/compose/hooks.go:45–50  ·  view source on GitHub ↗

hintLink returns a clickable OSC 8 terminal hyperlink when ANSI is allowed, or the plain URL when ANSI output is suppressed via NO_COLOR or COMPOSE_ANSI.

(url string)

Source from the content-addressed store, hash-verified

43// hintLink returns a clickable OSC 8 terminal hyperlink when ANSI is allowed,
44// or the plain URL when ANSI output is suppressed via NO_COLOR or COMPOSE_ANSI.
45func hintLink(url string) string {
46 if shouldDisableAnsi() {
47 return url
48 }
49 return formatter.OSC8Link(url, url)
50}
51
52// shouldDisableAnsi checks whether ANSI escape sequences should be explicitly
53// suppressed via environment variables. The hook runs as a separate subprocess

Callers 2

composeLogsHintFunction · 0.85
dockerLogsHintFunction · 0.85

Calls 2

OSC8LinkFunction · 0.92
shouldDisableAnsiFunction · 0.85

Tested by

no test coverage detected