Skip to main content

create_hyperlink

Function create_hyperlink 

Source
pub fn create_hyperlink(
    url: &str,
    content: Option<&str>,
    supports_hyperlinks: Option<bool>,
) -> String
Expand description

Create a clickable hyperlink using OSC 8 escape sequences. Falls back to plain text if the terminal doesn’t support hyperlinks.

§Arguments

  • url - The URL to link to
  • content - Optional content to display as the link text
  • supports_hyperlinks - Optional override for testing

§Returns

The hyperlink string or plain URL if hyperlinks not supported