Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

💡 OSC 8 hyperlink support

オープン
#67 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
c, typescript
領域
cli

調査の方向性

test/osc8-hyperlinks.test.ts の失敗しているテストと、ops.ts のテキスト操作から始めます。src/clayterm.c:562 の reduce を通るテキストデコードを追跡し、その後、レンダラーが run の周囲に OSC 8 を出力し、レンダリングと計測ではリンクのバイト列をゼロ幅のままにしていることを確認します。

索引モデルが issue の本文から書いたものです。

説明

enhancement

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.

主要言語
TypeScript
スター
42
フォーク
2
平均マージ
2日 5時間
マージ済み PR(30日)
12

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bombshell-dev/tty のほかの issue

bombshell-dev/tty の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。