💡 OSC 8 hyperlink support
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- c, typescript
- Domain
- cli
Research direction
Start with the failing test in test/osc8-hyperlinks.test.ts and the text operation in ops.ts. Trace text decoding through reduce at src/clayterm.c:562, then verify the renderer emits OSC 8 around the run while keeping the link bytes zero-width for rendering and measurement.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem?
There's no built-in way to render a hyperlink inside text. Terminals support OSC 8 hyperlinks (ESC ]8;;<url> … ESC ]8;;), which render as clickable links, but text only takes a string plus styling—so a CLI can't emit a clickable URL without hand-writing the escape sequence and fighting the renderer's U+FFFD substitution.
Describe the solution you'd like
Either a new link("value", { href: "https://example.com" }) util, or extending the text options with an optional { href }.
link("docs", { href: "https://example.com" });
text("docs", { href: "https://example.com" });
// emits: ESC ]8;;https://example.com ST docs ESC ]8;; ST
The link text renders and measures like normal text; the OSC 8 open/close bytes are zero-width.
Describe alternatives you've considered
Putting the OSC 8 bytes inside the content string doesn't work today—they'd be mangled to U+FFFD. A verbatim-passthrough escape hatch (#66) would let you hand-roll it, but a first-class href option keeps width accounting correct and the call site readable.
Additional context
Failing test case on nm/repro/osc8-hyperlinks (test · diff).
Needs an href field on the text op (ops.ts)—or a link() helper that sets it—carried through the text decode in reduce (src/clayterm.c:562); the renderer emits the OSC 8 open before the run's glyph cells and the close after, both zero-width.
- Dominant language
- TypeScript
- Stars
- 42
- Forks
- 2
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bombshell-dev/tty
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bombshell-dev/tty#61 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
bombshell-dev/tty#129 ·
-
question
Difficulty 5/5 Over a week Newbie friendliness 38/100
bombshell-dev/tty#112 ·
-
enhancement high priority
Difficulty 3/5 1-2 days Newbie friendliness 68/100
bombshell-dev/tty#83 · 2 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
bombshell-dev/tty#82 ·
All issues in bombshell-dev/tty
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·