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)
| 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. |
| 45 | func 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 |
no test coverage detected