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

install: offer to replace existing shell integration (interactive) + --force

Abierto
#6 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
52/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
rust

Línea de trabajo

Empieza en la comprobación del marcador del comando de instalación y resolve_self_path; después, sigue la cadena de la declaración de clap y del inventario-diff de try.usage.kdl. Lee docs/adr/0003-divergence-authority.md y la referencia de staging ADR-0004 antes de decidir el alcance. Se considera terminado cuando --force reemplaza únicamente el bloque generado, las sesiones TTY interactivas solicitan confirmación, las sesiones que no son TTY conservan el comportamiento de rechazo actual y los códigos de salida existentes y el manejo de solo lectura permanecen sin cambios.

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

Descripción

Problem

tryme install refuses when the # try shell integration marker already exists in the rc file:

try is already installed in /Users/x/.zshrc
To reinstall, remove the '# try shell integration' block first.

The installed block embeds the absolute path of the binary that ran install (resolve_self_path), so this bites on every channel switch — brew ↔ cargo ↔ dev build — and the remedy is hand-editing the rc file, which is exactly the surgery install exists to spare people. The eval "$(tryme init …)" form sidesteps it, but install should be able to maintain what it wrote.

This is upstream-inherited behavior (try.rb marker check), so shipping it is a deliberate divergence to be recorded per ADR-0003 — optionally proposed upstream first if we want the behaviors to converge, owner's call.

Proposal

Two additive changes, no change to any existing exit code or script-observable behavior (conformance suite unaffected — install has no upstream conformance test):

  1. tryme install --force — replace the marker-delimited block instead of refusing: strip from the # try shell integration line through the wrapper function it wrote, append the freshly generated block. Non-interactive-safe; second --force run is a no-op rewrite.

  2. Interactive default: prompt instead of refuse. Marker found + tty session → ask on stderr:

    try is already installed in ~/.zshrc — replace it? [y/N]
    

    N/default preserves today's behavior exactly (message + exit 0). Non-tty keeps the current refuse-with-hint unconditionally, so scripts/CI never block on a prompt. Read the answer from /dev/tty, consistent with the selector's stream discipline.

Safety

  • Replacement bounded strictly by the block install writes (marker + emitted function) — never pattern-match user-authored try functions.
  • Read-only rc files keep the existing warning + exit 1 path.
  • New --force flag joins the clap declaration + try.usage.kdl via the inventory-diff chain; hidden nothing.

Sequencing

Post-1.0 surface per ADR-0004 staging, or earlier if the owner rules the divergence in — it needs an ADR-0003 ruling-log entry either way.

Lenguaje dominante
Rust
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 indexzero/try.rs

Todos los issues de indexzero/try.rs

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.