Skip to content

osc8

Generated reference page for the osc8 function export.

Signatures

ts
function osc8(url: string | URL, text: string): string;
ParameterTypeDescription
urlstring | URLLink target (string or URL instance).
textstringVisible link text.

Members

Members

osc8

Wrap text in an OSC 8 hyperlink pointing at url.

Supporting terminals render text as a clickable link; non-supporting terminals ignore the escape sequence and show plain text. Combine with visibleWidth-aware formatting when embedding links in aligned output.

ts
(url: string | URL, text: string): string;

Examples

ts
cli('mycli').version(osc8('https://github.com/me/mycli/releases/tag/v1.0.0', '1.0.0'));

See Also

Released under the MIT License.