Clickable hyperlinks in Terminal.app on zsh
Mac M1
Monterey 12.2.1 (I am aware this needs updating; doing so at current location unfeasible)
Terminal Version 2.12 (443)
zsh 5.8 (x86_64-apple-darwin21.0)
This is partly a zsh/ASNI escape sequence question, however I am confident that people in this community may have faced this issue, and it is specifically a frustration configuring Terminal.app with zsh.
I want to print out a hyperlink like below (using a language called Dart).
This works in VSC's terminal emulator, producing a clickable, underlined hyperlink, but sadly it does not work if run in Terminal.app (both using zsh).
Is there a particular way to configure specific to this OS that folk here have encountered?
Terminal-->Preferences has no option.
EXAMPLE CODE:
void printClickableLink(String text, String url) {
if (Platform.isWindows) {
stdout.write('$text ($url)');
} else {
stdout.write('\u001B]8;;$url\u001B\\$text\u001B]8;;\u001B\\');
}
}
MacBook Air 13″, macOS 12.2