Skip to content

#435 を実装する(スプリント m10b) - #449

Merged
takemi-ohama merged 2 commits into
sprint/m10bfrom
feat/issue-435-m10b
Oct 8, 2026
Merged

takemi-ohama merged 2 commits into
sprint/m10bfrom
feat/issue-435-m10b

Conversation

@takemi-ohama

@takemi-ohama takemi-ohama commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

devbase の補完(zsh の etc/_devbase と bash の etc/devbase-completion.bash)で、--context を受け付けるすべてのサブコマンドが --context を候補に出すようにしました。あわせて、一致テストが補完の --context も比べることを、確定仕様と CHANGELOG に書きました。スプリント m10b のブランチへ集める変更です(#435)。

利用者向けの変化

  • --context を受け付けるすべてのサブコマンドで、zsh・bash の補完が --context を候補に出します

移行の手順

  • 無し

変更の要点

  • etc/_devbase(zsh)と etc/devbase-completion.bash(bash)で、--context を取るサブコマンドすべてに --context の補完を加えた
  • tests/cli/test_name_context_consistency.py の一致テストで、補完が出す --context も比べるようにした
  • tests/cli/test_completion.py を補完の変更に合わせて直した
  • docs/specifications/cli-argument-resolution.md と CHANGELOG.md に、一致テストが補完の --context を比べることを書いた

テスト

  • supervise.py の run のステップ test-limited: exit 0(範囲テスト 1 本、122.9 秒、戦略 local-full)

モード: standard / 通した工程: 実装 → 完了判定 → Pull Request

🤖 Generated with Claude Code

外すと落ちることの確認(受け入れ条件 5 の手動確認)

bash から env exec の --context を、zsh から env token の --context を一時的に外し、一致テストを打った。確認の後に元へ戻した。

    assert not [('env', 'exec')]
/Users/takemi_ohama/devbase/.worktrees/feat/issue-435-m10b/tests/cli/test_name_context_consistency.py:243: AssertionError: etc/devbase-completion.bash が `devbase <道> -` で --context を補完しない: [('env', 'exec')]
=========================== short test summary info ============================
FAILED tests/cli/test_name_context_consistency.py::test_zsh_completion_offers_context
FAILED tests/cli/test_name_context_consistency.py::test_bash_completion_offers_context_after_path
2 failed, 14 passed in 2.37s

課題と違えたところ: 一致テストは課題の原文が挙げる test_completion.py ではなく、#214 の一致テストのある test_name_context_consistency.py に足した(要求の前提 1)。トップレベル ps の zsh 補完は、打った語で分岐する形から project ps と同じ _arguments の形に揃えた。

固有の語の検査は手元では語の一覧が無く飛ばされた(検査していない)。CI の Proper term check の結果で確かめる。

takemi-ohama and others added 2 commits October 8, 2026 17:36
bash と zsh の補完が、--context NAME を取るすべての道(container の配下・
env exec・env token・入れ子の profile を含む)で --context を出す。値(docker
context の名前)は補完しない。一致テストが補完の --context を列挙の正本と比べる。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant