install: offer to replace existing shell integration (interactive) + --force
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
- Área
- cli, developer-experience
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):
-
tryme install --force— replace the marker-delimited block instead of refusing: strip from the# try shell integrationline through the wrapper function it wrote, append the freshly generated block. Non-interactive-safe; second--forcerun is a no-op rewrite. -
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
installwrites (marker + emitted function) — never pattern-match user-authoredtryfunctions. - Read-only rc files keep the existing warning + exit 1 path.
- New
--forceflag joins the clap declaration +try.usage.kdlvia 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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de indexzero/try.rs
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 65/100
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Todos los issues de indexzero/try.rs
Issues similares
-
C-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
rust-lang/rust-analyzer#23547 ·
Los mantenedores suelen responder en 1 día
-
tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OpenZeppelin/guardian#570 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
documentation priority:p2 type:chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
facebookincubator/scrut#60 ·