hyperlink: Terminal Hyperlinks

View source: R/link.R

hyperlinkR Documentation

Description

Terminal Hyperlinks

Usage

hyperlink(text, url)

has_hyperlink()

Arguments

text

Text to show. text and url are recycled to match their length, via a paste0() call.

url

URL to link to.

Details

hyperlink()' creates an ANSI hyperlink.

has_hyperlink() checks if the current stdout() supports hyperlinks. terminal links.

See also https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda.

Value

Logical scalar, for has_hyperlink().

Examples

cat("This is an", hyperlink("R", "https://r-project.org"), "link.\n")
has_hyperlink()

crayon documentation built on June 22, 2024, 9:39 a.m.