Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

💡 OSC 8 hyperlink support

Abierto
#67 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
c, typescript
Área
cli

Línea de trabajo

Comienza con la prueba que falla en test/osc8-hyperlinks.test.ts y la operación de texto en ops.ts. Sigue la decodificación del texto a través de reduce en src/clayterm.c:562 y luego verifica que el renderer emita OSC 8 alrededor del run, manteniendo los bytes del enlace con ancho cero para el renderizado y la medición.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
42
Forks
2
Merge medio
2 d 5 h
PR fusionados (30 d)
12

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de bombshell-dev/tty

Todos los issues de bombshell-dev/tty

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.