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).
textstring | undefinedVisible link text.

Members

Members

osc8

Wrap text in an OSC 8 hyperlink pointing at url.

Supporting terminals render text as a clickable link; others show it plain. text defaults to the URL, so an omitted label degrades to a usable address. The framework's help layer decides whether to link (help.hyperlinks); this always emits when called.

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'));
osc8('https://dreamcli.kjanat.dev'); // linked, displayed as the URL

See Also

Released under the MIT License.