install: offer to replace existing shell integration (interactive) + --force
まだ誰も着手していません。
評価
- 難易度
- 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):
-
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.
- 主要言語
- Rust
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
indexzero/try.rs のほかの issue
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
indexzero/try.rs の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
status:untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
midnightntwrk/midnight-zk#592 ·
メンテナーはふだん 3 日以内に返信
-
QuartoHub: have the Document name before the filename in the browser tab対応中かも @cscheid が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
quarto-dev/q2#930 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
muse P3
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
HerringtonDarkholme/hd-lang#923 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信