💡 OSC 8 hyperlink support
まだ誰も着手していません。
評価
- 難易度
- 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 の本文から書いたものです。
説明
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
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bombshell-dev/tty のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bombshell-dev/tty#61 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
bombshell-dev/tty#129 ·
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
bombshell-dev/tty#112 ·
-
enhancement high priority
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
bombshell-dev/tty#83 · コメント 2 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
bombshell-dev/tty#82 ·
bombshell-dev/tty の issue をすべて見る
似ている issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Crush オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/cln-application#167 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Quantco/pnpm-licenses#17 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100