style_hyperlink: Terminal Hyperlinks

Description Usage Arguments Details Value Examples

View source: R/ansi-hyperlink.R

Description

Terminal Hyperlinks

Usage

1
2
3

Arguments

text

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

url

URL to link to.

Details

ansi_hyperlink() creates an ANSI hyperlink.

ansi_has_hyperlink_support() checks if the current stdout() supports hyperlinks.

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

Value

Styled ansi_string for style_hyperlink(). Logical scalar for ansi_has_hyperlink_support().

Examples

1
2
cat("This is an", style_hyperlink("R", "https://r-project.org"), "link.\n")
ansi_has_hyperlink_support()

RonMobile/cli documentation built on Dec. 18, 2021, 11 a.m.