osc8
Generated reference page for the osc8 function export.
- Import:
@kjanat/dreamcli - Export kind: function
- Declared in:
src/core/help/ansi.ts - Source link:
src/core/help/ansi.ts:76
Signatures
ts
function osc8(url: string | URL, text?: string): string;| Parameter | Type | Description |
|---|---|---|
url | string | URL | Link target (string or URL instance). |
text | string | undefined | Visible 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