feat(shell): bin/rc で現在シェル有効化を統一・shell-rc 廃止 (PLAN31_1)#53
Merged
Conversation
破壊的変更: `devbase shell-rc` サブコマンドを削除。rc パスを print して `source "$(devbase shell-rc)"` する方式 (Python/uv 起動 + コマンド置換) を、 source 用の軽量スクリプト `bin/rc` に置き換える。 - bin/rc: 自身の場所から DEVBASE_ROOT を自己解決し、DEVBASE_ROOT/bin を PATH へ 追加 (冪等) + 補完を読み込む (bash/zsh 対応・init が rc に書く内容と同一)。 `. ~/devbase/bin/rc` で現在のシェルを即時有効化できる。 - bin/devbase / cli.py: shell-rc の dispatch・parser・command list を削除。 shell_rc.py を削除 (get_shell_rc_file は init が使うため utils に残置)。 - install.sh 完了案内・README・getting-started・cli-reference のワンライナー/ 手順を `. bin/rc` に更新。ワンライナーは `curl -fsSL https://dl.basex.jp/i | bash && . ~/devbase/bin/rc`。 - tests/cli/test_bin_rc.py: source で DEVBASE_ROOT/PATH 設定・devbase 解決・ PATH 冪等を検証 (5 件)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
devbase shell-rcサブコマンドを廃止し、source 用の軽量スクリプトbin/rcに統一source "$(devbase shell-rc)"(Python/uv 起動 + コマンド置換)→. ~/devbase/bin/rc(自己解決・サブプロセスなし)curl -fsSL https://dl.basex.jp/i | bash && . ~/devbase/bin/rc変更点
bin/rc(新規):${BASH_SOURCE[0]:-$0}で自己位置解決 →DEVBASE_ROOT設定 +binを PATH へ(冪等)+ 補完読込(bash:etc/devbase-completion.bashを source / zsh:fpath+compinit、init が rc に書く内容と同一)bin/devbase/lib/devbase/cli.py:shell-rcの dispatch・parser・command list を削除。commands/shell_rc.pyを削除(get_shell_rc_fileは init が使うためutils/shell.pyに残置)install.sh完了案内・README・getting-started・cli-referenceのワンライナー/手順を. bin/rcに更新CHANGELOG: Changed/Removed/Added 追記tests/cli/test_bin_rc.py(新規, 5 件)移行
source "$(devbase shell-rc)"を使うスクリプトは. <DEVBASE_ROOT>/bin/rcに置き換えてください。Test
shellcheck bin/rc(全 severity)指摘ゼロ /bin/devbase・install.shも severity=error 通過pytest tests/cli/test_bin_rc.py→ 5 passed