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

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

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

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

評価

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

調査の方向性

インストールコマンドのマーカーチェックと resolve_self_path から始め、次に clap の宣言と try.usage.kdl の inventory-diff チェーンをたどってください。スコープを決める前に、docs/adr/0003-divergence-authority.md と ADR-0004 の staging リファレンスを読んでください。完了の条件は、--force が生成されたブロックだけを置き換え、インタラクティブな TTY セッションではプロンプトを表示し、非 TTY セッションでは既存の拒否動作を維持し、既存の終了コードと read-only の処理が変更されないことです。

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

説明

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.

主要言語
Rust
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

indexzero/try.rs のほかの issue

indexzero/try.rs の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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