-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Hi authors 👋
Happy Holidays 🎄
Issue Summary
We are developing a CLI tool and wanted to embed some links using this library. We found that the support for links is somewhat varied across the different terminal types supported by macOS. This is fine but we have had to add our own logic to work out which of these Terminal applications support links.
This is what we expected the feature SupportsHyperlinks()
todo for us. Sadly on the default Terminal application that is provided with the macOS, the return value for SupportsHyperlinks()
is true
but the link is hidden and not clickable. The text appears in the console like all other text and you would not know it was special to any other fmt.Println()
statement.
Change request
Is it possible to improve the library so that it is aware of this feature being disable in the macOS Terminal app so we can remove our simple bespoke code that is doing this logic for us?
Versions
GO Version: go version go1.21.6 darwin/arm64
Library Version: github.com/savioxavier/termlink v1.4.1
macOS version: Sonoma 14.7.1 (23H222)
Terminal version: Version 2.14 (453)
Screenshots
macOS Terminal application

iterm2 terminal application

VS Code

Example simple bespoke patch implementation in our code
func isUsingATerminalWhichSupportsLinks() bool {
termProgram := os.Getenv("TERM_PROGRAM")
switch termProgram {
case "iTerm.app":
return true
case "vscode":
return true
default:
return false
}
}